|
@@ -7,10 +7,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="ShhTicketRules" id="ShhTicketRulesResult">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="ticketRules" column="ticket_rules" />
|
|
|
+ <result property="ticketMoney" column="ticket_money" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectShhTicketRulesVo">
|
|
|
- select id, ticket_rules
|
|
|
+ select id, ticket_rules,ticket_money
|
|
|
from shh_ticket_rules
|
|
|
</sql>
|
|
|
|
|
@@ -18,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT
|
|
|
tr.id,
|
|
|
ticket_rules,
|
|
|
+ ticket_money,
|
|
|
GROUP_CONCAT( pttm.ticket_name ) AS ticketName
|
|
|
FROM
|
|
|
shh_ticket_rules tr
|
|
@@ -31,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectShhTicketRulesById" parameterType="Long" resultMap="ShhTicketRulesResult">
|
|
|
- select tr.id, ticket_rules, GROUP_CONCAT(trd.ticket_id) as ticketId
|
|
|
+ select tr.id, ticket_rules,ticket_money, GROUP_CONCAT(trd.ticket_id) as ticketId
|
|
|
from shh_ticket_rules tr
|
|
|
left join shh_ticket_rules_data trd on tr.id = trd.rules_id
|
|
|
where tr.id = #{id}
|
|
@@ -43,9 +45,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
insert into shh_ticket_rules
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="ticketRules != null">ticket_rules,</if>
|
|
|
+ <if test="ticketMoney != null">ticket_money,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="ticketRules != null">#{ticketRules},</if>
|
|
|
+ <if test="ticketMoney != null">#{ticketMoney},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -53,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update shh_ticket_rules
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="ticketRules != null">ticket_rules = #{ticketRules},</if>
|
|
|
+ <if test="ticketMoney != null">ticket_money = #{ticketMoney},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|