You've already forked FrameTour-BE
fix(pricing): 调整用户优惠券查询逻辑
- 修改查询条件,移除状态限制,支持查询所有状态的优惠券记录 - 更新注释说明,明确查询目的为检查用户是否领取过指定优惠券
This commit is contained in:
@@ -29,10 +29,10 @@ public interface PriceCouponClaimRecordMapper extends BaseMapper<PriceCouponClai
|
|||||||
List<PriceCouponClaimRecord> selectUserAvailableCoupons(Long userId);
|
List<PriceCouponClaimRecord> selectUserAvailableCoupons(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户特定优惠券记录
|
* 查询用户特定优惠券记录(检查是否领取过,不限状态)
|
||||||
*/
|
*/
|
||||||
@Select("SELECT * FROM price_coupon_claim_record " +
|
@Select("SELECT * FROM price_coupon_claim_record " +
|
||||||
"WHERE user_id = #{userId} AND coupon_id = #{couponId} AND status = 'CLAIMED'")
|
"WHERE user_id = #{userId} AND coupon_id = #{couponId}")
|
||||||
PriceCouponClaimRecord selectUserCouponRecord(@Param("userId") Long userId,
|
PriceCouponClaimRecord selectUserCouponRecord(@Param("userId") Long userId,
|
||||||
@Param("couponId") Long couponId);
|
@Param("couponId") Long couponId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user