Browse Source

处理评论加积分

wangzhijun 1 tuần trước cách đây
mục cha
commit
11205551d0

+ 8 - 1
nightFragrance-massage/src/main/java/com/ylx/massage/service/impl/TCommentUserServiceImpl.java

@@ -19,6 +19,8 @@ import com.ylx.massage.mapper.TCommentUserMapper;
 import com.ylx.massage.service.TCommentUserAuditService;
 import com.ylx.massage.service.TCommentUserService;
 import com.ylx.massage.service.TOrderService;
+import com.ylx.point.domain.dto.ApiAddPointsDTO;
+import com.ylx.point.service.IPointAccountService;
 import com.ylx.usercenter.domain.dto.UnifiedUserCenterDTO;
 import com.ylx.usercenter.service.UnifiedUserCenterService;
 import lombok.extern.slf4j.Slf4j;
@@ -55,6 +57,8 @@ public class TCommentUserServiceImpl extends ServiceImpl<TCommentUserMapper, TCo
     private LotteryCountLogService lotteryCountLogService;
     @Resource
     private UnifiedUserCenterService unifiedUserCenterService;
+    @Resource
+    private IPointAccountService pointAccountService;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -134,7 +138,10 @@ public class TCommentUserServiceImpl extends ServiceImpl<TCommentUserMapper, TCo
             List<LocalActivityTableVO> pointTables = activity.getGyyPointTables();
             if (CollUtil.isNotEmpty(pointTables)) {
                 for (LocalActivityTableVO table : pointTables) {
-                    saveLotteryLog(wxLoginUser, table, table.getPointNumber());
+                    ApiAddPointsDTO dto = new ApiAddPointsDTO();
+                    dto.setUserId(wxLoginUser.getId());
+                    dto.setPoints(table.getPointNumber());
+                    pointAccountService.apiAddPoints(dto);
                 }
                 continue;
             }