fix(pricing): 调整用户优惠券查询逻辑

- 修改查询条件,移除状态限制,支持查询所有状态的优惠券记录
- 更新注释说明,明确查询目的为检查用户是否领取过指定优惠券
This commit is contained in:
2025-11-15 16:29:05 +08:00
parent c319398c58
commit 1a25848102

View File

@@ -29,10 +29,10 @@ public interface PriceCouponClaimRecordMapper extends BaseMapper<PriceCouponClai
List<PriceCouponClaimRecord> selectUserAvailableCoupons(Long userId);
/**
* 查询用户特定优惠券记录
* 查询用户特定优惠券记录(检查是否领取过,不限状态)
*/
@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,
@Param("couponId") Long couponId);