|
|
@@ -6,17 +6,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<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
|
|
|
+ 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>
|
|
|
|
|
|
|
|
|
<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 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 FROM items ${ew.customSqlSegment}
|
|
|
</select>
|
|
|
|
|
|
<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 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 FROM items WHERE id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<update id="updateItemsById">
|
|
|
@@ -38,6 +38,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="itemTypeCode != null and itemTypeCode != ''">
|
|
|
item_type_code = #{itemTypeCode},
|
|
|
</if>
|
|
|
+ <if test="itemValue != null">
|
|
|
+ item_value = #{itemValue},
|
|
|
+ </if>
|
|
|
+ <if test="effectiveType != null">
|
|
|
+ effective_type = #{effectiveType},
|
|
|
+ </if>
|
|
|
+ <if test="expireTime != null">
|
|
|
+ expire_time = #{expireTime},
|
|
|
+ </if>
|
|
|
+ <if test="effectiveDay != null">
|
|
|
+ effective_day = #{effectiveDay},
|
|
|
+ </if>
|
|
|
+ <if test="giftTypeParentId != null">
|
|
|
+ gift_type_parent_id = #{giftTypeParentId},
|
|
|
+ </if>
|
|
|
+ <if test="giftTypeChildId != null">
|
|
|
+ gift_type_child_id = #{giftTypeChildId},
|
|
|
+ </if>
|
|
|
+ <if test="itemUrl != null">
|
|
|
+ item_url = #{itemUrl},
|
|
|
+ </if>
|
|
|
+ <if test="isGiveAway != null">
|
|
|
+ is_give_away = #{isGiveAway},
|
|
|
+ </if>
|
|
|
+ <if test="itemCount != null">
|
|
|
+ item_count = #{itemCount},
|
|
|
+ </if>
|
|
|
updated_at = NOW()
|
|
|
</set>
|
|
|
WHERE id = #{id}
|
|
|
@@ -53,6 +80,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="itemValue != null">item_value,</if>
|
|
|
<if test="itemJson != null and itemJson != ''">item_json,</if>
|
|
|
<if test="itemTypeCode != null and itemTypeCode != ''">item_type_code,</if>
|
|
|
+ <if test="effectiveType != null">effective_type,</if>
|
|
|
+ <if test="expireTime != null">expire_time,</if>
|
|
|
+
|
|
|
+ <if test="effectiveDay != null">effective_day,</if>
|
|
|
+ <if test="giftTypeParentId != null">gift_type_parent_id,</if>
|
|
|
+
|
|
|
+ <if test="giftTypeChildId != null">gift_type_child_id,</if>
|
|
|
+ <if test="itemUrl != null">item_url,</if>
|
|
|
+
|
|
|
+ <if test="isGiveAway != null">is_give_away,</if>
|
|
|
+ <if test="itemCount != null">item_count,</if>
|
|
|
</trim>
|
|
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
|
@@ -61,6 +99,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="itemValue != null">#{itemValue},</if>
|
|
|
<if test="itemJson != null and itemJson != ''">#{itemJson},</if>
|
|
|
<if test="itemTypeCode != null and itemTypeCode != ''">#{itemTypeCode},</if>
|
|
|
+ <if test="effectiveType != null">#{effectiveType},</if>
|
|
|
+ <if test="expireTime != null">#{expireTime},</if>
|
|
|
+
|
|
|
+ <if test="effectiveDay != null">#{effectiveDay},</if>
|
|
|
+ <if test="giftTypeParentId != null">#{giftTypeParentId},</if>
|
|
|
+
|
|
|
+ <if test="giftTypeChildId != null">#{giftTypeChildId},</if>
|
|
|
+ <if test="itemUrl != null">#{itemUrl},</if>
|
|
|
+
|
|
|
+ <if test="isGiveAway != null">#{isGiveAway},</if>
|
|
|
+ <if test="itemCount != null">#{itemCount},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -79,7 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
<select id="selectItemsSelList" resultType="org.dromara.business.domain.vo.ItemsVo">
|
|
|
- SELECT id, name, item_type,item_desc, created_at, updated_at,item_value FROM items
|
|
|
+ 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>
|
|
|
|
|
|
</mapper>
|