|
@@ -63,15 +63,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectLiveCouponUserList" parameterType="LiveCouponUser" resultMap="LiveCouponUserResult">
|
|
<select id="selectLiveCouponUserList" parameterType="LiveCouponUser" resultMap="LiveCouponUserResult">
|
|
|
|
|
|
|
|
select cou.id, cou.coupon_id, cou.user_id, cou.coupon_title, cou.coupon_price, cou.use_min_price, cou.create_time, cou.update_time, cou.limit_time, cou.use_time, cou.type, cou.status, cou.is_fail, cou.is_del,cou.goods_id,
|
|
select cou.id, cou.coupon_id, cou.user_id, cou.coupon_title, cou.coupon_price, cou.use_min_price, cou.create_time, cou.update_time, cou.limit_time, cou.use_time, cou.type, cou.status, cou.is_fail, cou.is_del,cou.goods_id,
|
|
|
- u.nick_name,u.phone
|
|
|
|
|
|
|
+ cou.verify_code, cou.verify_user_id, cou.verify_time
|
|
|
|
|
|
|
|
from live_coupon_user as cou
|
|
from live_coupon_user as cou
|
|
|
left join fs_user u on cou.user_id=u.user_id
|
|
left join fs_user u on cou.user_id=u.user_id
|
|
|
|
|
|
|
|
<where>
|
|
<where>
|
|
|
|
|
+ and (cou.is_del is null or cou.is_del = 0)
|
|
|
<if test="couponId != null "> and cou.coupon_id = #{couponId}</if>
|
|
<if test="couponId != null "> and cou.coupon_id = #{couponId}</if>
|
|
|
<if test="userId != null "> and cou.user_id = #{userId}</if>
|
|
<if test="userId != null "> and cou.user_id = #{userId}</if>
|
|
|
- <if test="couponTitle != null and couponTitle != ''"> and cou.coupon_title = #{couponTitle}</if>
|
|
|
|
|
|
|
+ <if test="couponTitle != null and couponTitle != ''"> and cou.coupon_title like concat('%', #{couponTitle}, '%')</if>
|
|
|
<if test="couponPrice != null "> and cou.coupon_price = #{couponPrice}</if>
|
|
<if test="couponPrice != null "> and cou.coupon_price = #{couponPrice}</if>
|
|
|
<if test="useMinPrice != null "> and cou.use_min_price = #{useMinPrice}</if>
|
|
<if test="useMinPrice != null "> and cou.use_min_price = #{useMinPrice}</if>
|
|
|
<if test="limitTime != null "> and cou.limit_time = #{limitTime}</if>
|
|
<if test="limitTime != null "> and cou.limit_time = #{limitTime}</if>
|
|
@@ -83,7 +84,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="goodsId != null "> and cou.goods_id = #{goodsId}</if>
|
|
<if test="goodsId != null "> and cou.goods_id = #{goodsId}</if>
|
|
|
<if test="verifyCode != null and verifyCode != ''"> and cou.verify_code = #{verifyCode}</if>
|
|
<if test="verifyCode != null and verifyCode != ''"> and cou.verify_code = #{verifyCode}</if>
|
|
|
<if test="verifyUserId != null "> and cou.verify_user_id = #{verifyUserId}</if>
|
|
<if test="verifyUserId != null "> and cou.verify_user_id = #{verifyUserId}</if>
|
|
|
|
|
+ <if test="params.bindCompanyUserId != null"> and u.bind_company_user_id = #{params.bindCompanyUserId}</if>
|
|
|
|
|
+ <if test="params.beginTime != null and params.beginTime != ''">
|
|
|
|
|
+ and date_format(cou.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="params.endTime != null and params.endTime != ''">
|
|
|
|
|
+ and date_format(cou.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
|
|
+ order by cou.create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectLiveCouponUserDetailList" parameterType="com.fs.live.param.CouponPO" resultMap="LiveCouponUserDetailVoResult">
|
|
<select id="selectLiveCouponUserDetailList" parameterType="com.fs.live.param.CouponPO" resultMap="LiveCouponUserDetailVoResult">
|