Răsfoiți Sursa

fix 领取优惠卷

zoujiajian 3 ani în urmă
părinte
comite
b7d80eed4e

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/coupon/impl/CouponFontServiceImpl.java

@@ -222,7 +222,7 @@ public class CouponFontServiceImpl implements CouponFontService {
 				throw BusinessRuntimeException.getInstance("该优惠卷只能新用户才能领取");
 			}
 		}
-		CouponUser couponUser = couponUserMapper.selectOne(Wrappers.lambdaQuery(CouponUser.class).eq(CouponUser::getCouponId, couponCollectReq.getCouponId()));
+		CouponUser couponUser = couponUserMapper.selectOne(Wrappers.lambdaQuery(CouponUser.class).eq(CouponUser::getUserId, userId).eq(CouponUser::getCouponId, couponCollectReq.getCouponId()));
 		if (couponUser != null) {
 			if (couponUser.getChannel() == CouponUser.Channel.exCode) {
 				throw BusinessRuntimeException.getInstance("您已兑换过该优惠卷..");