|
|
@@ -19,26 +19,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="isDel" column="is_del" />
|
|
|
+ <result property="liveLimitNum" column="live_limit_num" />
|
|
|
+ <result property="productId" column="product_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLiveCouponVo">
|
|
|
- select coupon_id, title, integral, coupon_price, use_min_price, coupon_time, sort, status, product_ids, package_cate_ids, type, create_time, update_time, is_del from live_coupon
|
|
|
+ select coupon_id, title, integral, coupon_price, use_min_price, coupon_time, sort, status, product_ids, package_cate_ids, type, create_time, update_time, is_del, live_limit_num, product_id from live_coupon
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectLiveCouponList" parameterType="LiveCoupon" resultMap="LiveCouponResult">
|
|
|
- <include refid="selectLiveCouponVo"/>
|
|
|
+ select lc.coupon_id, lc.title, lc.integral, lc.coupon_price, lc.use_min_price, lc.coupon_time, lc.sort, lc.status, lc.product_ids, lc.package_cate_ids, lc.type, lc.create_time, lc.update_time, lc.is_del, lc.live_limit_num, lc.product_id, fsp.product_name from live_coupon lc
|
|
|
+ left join fs_store_product fsp on lc.product_id = fsp.product_id
|
|
|
<where>
|
|
|
- <if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
- <if test="integral != null and integral != ''"> and integral = #{integral}</if>
|
|
|
- <if test="couponPrice != null "> and coupon_price = #{couponPrice}</if>
|
|
|
- <if test="useMinPrice != null "> and use_min_price = #{useMinPrice}</if>
|
|
|
- <if test="couponTime != null "> and coupon_time = #{couponTime}</if>
|
|
|
- <if test="sort != null "> and sort = #{sort}</if>
|
|
|
- <if test="status != null "> and status = #{status}</if>
|
|
|
- <if test="productIds != null and productIds != ''"> and product_ids = #{productIds}</if>
|
|
|
- <if test="packageCateIds != null and packageCateIds != ''"> and package_cate_ids = #{packageCateIds}</if>
|
|
|
- <if test="type != null "> and type = #{type}</if>
|
|
|
- <if test="isDel != null "> and is_del = #{isDel}</if>
|
|
|
+ <if test="title != null and title != ''"> and lc.title = #{title}</if>
|
|
|
+ <if test="integral != null and integral != ''"> and lc.integral = #{integral}</if>
|
|
|
+ <if test="couponPrice != null "> and lc.coupon_price = #{couponPrice}</if>
|
|
|
+ <if test="useMinPrice != null "> and lc.use_min_price = #{useMinPrice}</if>
|
|
|
+ <if test="couponTime != null "> and lc.coupon_time = #{couponTime}</if>
|
|
|
+ <if test="sort != null "> and lc.sort = #{sort}</if>
|
|
|
+ <if test="status != null "> and lc.status = #{status}</if>
|
|
|
+ <if test="productIds != null and productIds != ''"> and lc.product_ids = #{productIds}</if>
|
|
|
+ <if test="packageCateIds != null and packageCateIds != ''"> and lc.package_cate_ids = #{packageCateIds}</if>
|
|
|
+ <if test="type != null "> and lc.type = #{type}</if>
|
|
|
+ <if test="isDel != null "> and lc.is_del = #{isDel}</if>
|
|
|
+ <if test="liveLimitNum != null "> and lc.live_limit_num = #{liveLimitNum}</if>
|
|
|
+ <if test="productId != null "> and lc.product_id = #{productId}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -63,6 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="isDel != null">is_del,</if>
|
|
|
+ <if test="liveLimitNum != null">live_limit_num,</if>
|
|
|
+ <if test="productId != null">product_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="title != null and title != ''">#{title},</if>
|
|
|
@@ -78,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="isDel != null">#{isDel},</if>
|
|
|
+ <if test="liveLimitNum != null">#{liveLimitNum},</if>
|
|
|
+ <if test="productId != null">#{productId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -97,6 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="isDel != null">is_del = #{isDel},</if>
|
|
|
+ <if test="liveLimitNum != null">live_limit_num = #{liveLimitNum},</if>
|
|
|
+ <if test="productId != null">product_id = #{productId},</if>
|
|
|
</trim>
|
|
|
where coupon_id = #{couponId}
|
|
|
</update>
|