From 9046111e6d8d8110d3c9ad450651f3f51f40aabd Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Thu, 6 Dec 2018 10:03:40 +0800 Subject: [PATCH] =?UTF-8?q?[fix=20circle=20reference=20issue][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxCUserBasicInfoServiceImpl.java | 5 ++--- .../service/impl/WxScoreRulesServiceImpl.java | 14 ++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java index e1e181d0a..6f33b8016 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/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 listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java index 23f803aca..489309a34 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxScoreRulesServiceImpl.java +++ b/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) {