|
@@ -6,17 +6,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectVoPage" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
<select id="selectVoPage" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
|
- SELECT id, name, item_type,item_desc, created_at, updated_at,item_value,item_json,item_type_code,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count
|
|
|
|
|
|
|
+ SELECT id, name, item_type,item_desc, created_at, updated_at,item_value,item_json,item_type_code,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count,is_common,give_stop_type,give_stop_time
|
|
|
FROM items ${ew.customSqlSegment}
|
|
FROM items ${ew.customSqlSegment}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectItemsList" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
<select id="selectItemsList" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
|
- SELECT id, name, item_type,item_desc, created_at, updated_at,item_value,item_json,item_type_code,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count FROM items ${ew.customSqlSegment}
|
|
|
|
|
|
|
+ SELECT id, name, item_type,item_desc, created_at, updated_at,item_value,item_json,item_type_code,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count,is_common,give_stop_type,give_stop_time FROM items ${ew.customSqlSegment}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectVoByIdInfo" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
<select id="selectVoByIdInfo" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
|
- SELECT id, name, item_type,item_desc, created_at, updated_at,item_value,item_json,item_type_code,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count FROM items WHERE id = #{id}
|
|
|
|
|
|
|
+ SELECT id, name, item_type,item_desc, created_at, updated_at,item_value,item_json,item_type_code,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count,is_common,give_stop_type,give_stop_time FROM items WHERE id = #{id}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<update id="updateItemsById">
|
|
<update id="updateItemsById">
|
|
@@ -65,12 +65,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="itemCount != null">
|
|
<if test="itemCount != null">
|
|
|
item_count = #{itemCount},
|
|
item_count = #{itemCount},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="isCommon != null">
|
|
|
|
|
+ is_common = #{isCommon},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ give_stop_type = #{giveStopType},
|
|
|
|
|
+ give_stop_time = #{giveStopTime},
|
|
|
updated_at = NOW()
|
|
updated_at = NOW()
|
|
|
</set>
|
|
</set>
|
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<insert id="insertItems" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertItems" useGeneratedKeys="true" keyProperty="id">
|
|
|
INSERT INTO items
|
|
INSERT INTO items
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -91,6 +95,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
<if test="isGiveAway != null">is_give_away,</if>
|
|
<if test="isGiveAway != null">is_give_away,</if>
|
|
|
<if test="itemCount != null">item_count,</if>
|
|
<if test="itemCount != null">item_count,</if>
|
|
|
|
|
+ <if test="isCommon != null">is_common,</if>
|
|
|
|
|
+ <if test="giveStopType != null">give_stop_type,</if>
|
|
|
|
|
+ <if test="giveStopTime != null">give_stop_time,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
@@ -110,6 +117,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
<if test="isGiveAway != null">#{isGiveAway},</if>
|
|
<if test="isGiveAway != null">#{isGiveAway},</if>
|
|
|
<if test="itemCount != null">#{itemCount},</if>
|
|
<if test="itemCount != null">#{itemCount},</if>
|
|
|
|
|
+ <if test="isCommon != null">#{isCommon},</if>
|
|
|
|
|
+ <if test="giveStopType != null">#{giveStopType},</if>
|
|
|
|
|
+ <if test="giveStopTime != null">#{giveStopTime},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -128,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectItemsSelList" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
<select id="selectItemsSelList" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
|
- SELECT id, name, item_type,item_desc, created_at, updated_at,item_value,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count FROM items
|
|
|
|
|
|
|
+ SELECT id,is_common,name, item_type,item_desc, created_at, updated_at,item_value,effective_type,expire_time, effective_day, gift_type_parent_id, gift_type_child_id, item_url, is_give_away, item_count,give_stop_type,give_stop_time FROM items
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|