ソースを参照

开发优惠券相关的功能

jinshihui 1 週間 前
コミット
3747cb3e71

+ 2 - 1
nightFragrance-massage/src/main/java/com/ylx/massage/service/impl/CouponReceiveServiceImpl.java

@@ -114,7 +114,8 @@ public class CouponReceiveServiceImpl extends ServiceImpl<CouponReceiveMapper, C
     public R<?> receiveVolution(ClaimCouponRequestVO claimCouponRequestVO) {
         // 1、查询用户信息
         WxLoginUser wxLoginUser = getWxLoginUser();
-        log.info("当前用户的openId:{}", wxLoginUser.getCOpenid());
+        String openid = wxLoginUser.getCOpenid();
+        log.info("当前用户的openId:{}", openid);
         //2、保存优惠券信息到coupon_receive表
         // 构建防重复提交的key:用户openId + 优惠卷id
         String lockKey = SHARE_LOCK_KEY + wxLoginUser.getCOpenid() + ":" + claimCouponRequestVO.getTemplateId();

+ 1 - 3
nightFragrance-massage/src/main/resources/mapper/massage/CouponReceiveMapper.xml

@@ -18,9 +18,7 @@
     </resultMap>
 
     <sql id="selectCouponReceiveVo">
-        a.id, a.receive_open_id, a.coupon_id, a.validity_type,a.valid_start_time,a.expiration_time,a.coupon_status,a.create_time, a.update_time, a.is_delete,
-         b.coupon_name, b.image_url,b.coupon_type,b.rule_min_spend_amount,b.rule_discount_rate,b.rule_discount_cap_amount,b.rule_reduction_amount,
-            b.related_type,b.related_id,b.related_name
+        distinct a.id, a.receive_open_id, a.coupon_id, b.coupon_name,a.validity_type,a.valid_start_time,a.expiration_time,a.coupon_status,b.market_price,a.create_time, a.update_time, a.is_delete
     </sql>
 
     <!-- 批量插入 -->