Преглед изворни кода

[fix circle reference issue][修改]

release_toaliyun_real
Stormeye Wu пре 7 година
родитељ
комит
9046111e6d
2 измењених фајлова са 8 додато и 11 уклоњено
  1. +2
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  2. +6
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java

+ 2
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Прегледај датотеку

@@ -51,7 +51,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

@Service
public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
@@ -73,10 +72,10 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
WxCUserTagsService wxCUserTagsService;

@Autowired
StringRedisTemplate stringRedisTemplate;
WxScoreRulesService wxScoreRulesService;

@Autowired
WxScoreRulesService wxScoreRulesService;
StringRedisTemplate stringRedisTemplate;

@Override
public PageInfo<WxCUserBasicInfo> listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize) {


+ 6
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java Прегледај датотеку

@@ -6,13 +6,11 @@ import com.iformall.common.IdWorker;
import com.iformall.domain.po.*;
import com.iformall.enums.EnumBusiness;
import com.iformall.enums.EnumScoreType;
import com.iformall.mapper.WxCUserBasicInfoMapper;
import com.iformall.mapper.WxScoreHistoryMapper;
import com.iformall.mapper.WxScoreRulesMapper;
import com.iformall.service.WxCUserBasicInfoService;
import com.iformall.service.WxCUserService;
import com.iformall.service.WxScoreRulesService;
import com.iformall.utils.RedisUtils;
import jdk.nashorn.internal.ir.IdentNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,9 +32,9 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService {
@Autowired
WxScoreHistoryMapper wxScoreHistoryMapper;
@Autowired
WxCUserService wxCUserService;
WxCUserBasicInfoMapper wxCUserBasicInfoMapper;
@Autowired
WxCUserBasicInfoService wxCUserBasicInfoService;
WxCUserService wxCUserService;

@Autowired
@Qualifier("scoreRuleRedisTemplate")
@@ -118,20 +116,20 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService {
wxCUserBasicInfo.setTenantId(wxCUser.getTenantId());
wxCUserBasicInfo.setPhone(wxCUser.getPhone());
wxCUserBasicInfo.setPoins(newScore);
wxCUserBasicInfoService.updateScore(wxCUserBasicInfo);
wxCUserBasicInfoMapper.updateScore(wxCUserBasicInfo);
}
}

private void resetBasicUserScore(Long userId, int scoreNumber) {
// 1. basicUser
WxCUserBasicInfo user = wxCUserBasicInfoService.getById(userId);
WxCUserBasicInfo user = wxCUserBasicInfoMapper.selectByPrimaryKey(userId);
if(user == null) {
return;
}

// 2. update score/ 修改basic表积分
user.setPoins(scoreNumber);
wxCUserBasicInfoService.updateScore(user);
wxCUserBasicInfoMapper.updateScore(user);

// 3. 修改 c_user表积分 score
if (user.getPhone() != null) {


Loading…
Откажи
Сачувај