Browse Source

评价有礼、支付有礼同步本地生活获奖次数bug修复

wangzhijun 6 days ago
parent
commit
24f27db2cc

+ 0 - 2
nightFragrance-massage/src/main/java/com/ylx/massage/service/TCommentUserService.java

@@ -32,7 +32,5 @@ public interface TCommentUserService extends IService<TCommentUser> {
      */
      List<TCommentUser> selectAll(TCommentUser tCommentUser);
 
-    void saveLotteryLogAndCommit(WxLoginUser wxLoginUser, LocalActivityTableVO table, Integer lotteryNum);
-
 }
 

+ 3 - 11
nightFragrance-massage/src/main/java/com/ylx/massage/service/impl/TCommentUserServiceImpl.java

@@ -24,7 +24,6 @@ import com.ylx.point.service.IPointAccountService;
 import com.ylx.usercenter.domain.dto.UnifiedUserCenterDTO;
 import com.ylx.usercenter.service.UnifiedUserCenterService;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.support.TransactionSynchronization;
@@ -60,9 +59,6 @@ public class TCommentUserServiceImpl extends ServiceImpl<TCommentUserMapper, TCo
     private UnifiedUserCenterService unifiedUserCenterService;
     @Resource
     private IPointAccountService pointAccountService;
-    @Lazy
-    @Resource
-    private TCommentUserService self;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -166,7 +162,7 @@ public class TCommentUserServiceImpl extends ServiceImpl<TCommentUserMapper, TCo
                 if (ObjectUtil.equals(table.getType(), "4")) {
                     table.setActivityUrl(activityUrl);
                     table.setActivityId(activity.getId());
-                    self.saveLotteryLogAndCommit(wxLoginUser, table, 1);
+                    saveLotteryLog(wxLoginUser, table, 1);
                 }
             }
         }
@@ -175,9 +171,7 @@ public class TCommentUserServiceImpl extends ServiceImpl<TCommentUserMapper, TCo
     /**
      * 统一保存抽奖次数日志
      */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public void saveLotteryLogAndCommit(WxLoginUser wxLoginUser, LocalActivityTableVO table, Integer lotteryNum) {
+    private void saveLotteryLog(WxLoginUser wxLoginUser, LocalActivityTableVO table, Integer lotteryNum) {
         LotteryCountLog log = new LotteryCountLog();
         log.setOpenId(wxLoginUser.getCOpenid());
         log.setUserId(wxLoginUser.getId());
@@ -219,6 +213,4 @@ public class TCommentUserServiceImpl extends ServiceImpl<TCommentUserMapper, TCo
 
         }
     }
-
-}
-
+}

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

@@ -1572,8 +1572,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         if (ObjectUtil.equals(user.getIsBind(), 1) && com.ylx.common.utils.StringUtils.isNotBlank(user.getLocalLiveUserId())) {
 
             UnifiedUserCenterDTO dto = new UnifiedUserCenterDTO();
-            dto.setTargetUserId(user.getLocalLiveUserId());
-            dto.setSourceUserId(user.getId());
+            dto.setSourceUserId(user.getLocalLiveUserId());
+            dto.setTargetUserId(user.getId());
 
             // 👇 加上这个 if 判断,只有当当前存在活跃事务时,才去注册 afterCommit 回调
             if (TransactionSynchronizationManager.isSynchronizationActive()) {