|
|
@@ -93,7 +93,7 @@ public interface FsUserCouponMapper
|
|
|
@Select("SELECT COUNT(c.coupon_id) FROM fs_user_coupon u LEFT JOIN fs_coupon c ON u.coupon_id=c.coupon_id WHERE u.user_id=#{userId} and c.coupon_id=#{couponId}")
|
|
|
Integer selectFsUserCouponByUserIdTypeCount(@Param("userId") Long userId,@Param("couponId")Long couponId);
|
|
|
@Select({"<script> " +
|
|
|
- "select uc.coupon_code,uc.status,uc.use_time,c.limit_time,c.title,c.price,c.min_price from fs_user_coupon uc left join fs_coupon c on c.coupon_id=uc.coupon_id " +
|
|
|
+ "select uc.coupon_code,uc.status,uc.use_time,IFNULL(uc.limit_time, c.limit_time) as limit_time,c.title,c.price,c.min_price from fs_user_coupon uc left join fs_coupon c on c.coupon_id=uc.coupon_id " +
|
|
|
"where 1=1 " +
|
|
|
"<if test = ' maps.userId != null '> " +
|
|
|
"and uc.user_id = #{maps.userId} " +
|