未使用券 不可用删除

This commit is contained in:
2024-11-14 14:15:09 +08:00
parent 42775cae36
commit aba8d9b524

View File

@@ -45,7 +45,8 @@ public interface TbActivateInRecordMapper extends BaseMapper<TbActivateInRecord>
List<TbUserCouponVo> queryByVipIdAndShopId(@Param("vipUserId") Integer vipUserId, @Param("shopId") Integer shopId);
@Select("SELECT sum( over_num ) from tb_activate_in_record" +
" where coupon_id = #{couponId} and now() &lt; use_end_time group by coupon_id ")
" where coupon_id = #{couponId} " +
" and now() < use_end_time group by coupon_id ")
int countNoUseCoupon(@Param("couponId") Integer couponId);