From f2275aee80e0b8570fc15dfb486daaf7d853046f Mon Sep 17 00:00:00 2001 From: Burce Date: Tue, 3 Sep 2019 17:11:22 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]C=E7=AB=AF=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=99=BB=E5=BD=95=E5=90=8E=E7=A7=AF=E5=88=86=E5=92=8C?= =?UTF-8?q?=E6=88=90=E9=95=BF=E5=80=BC=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/iformall/controller/BaseController.java | 2 +- .../java/com/iformall/service/WxCUserBasicInfoService.java | 7 ++----- .../iformall/service/impl/WxCUserBasicInfoServiceImpl.java | 4 +++- .../src/main/resources/mapper/WxCUserBasicInfoMapper.xml | 2 +- .../main/java/com/iformall/controller/BaseController.java | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java b/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java index 89915c6b5..384b8d809 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java @@ -144,7 +144,7 @@ public class BaseController { if (basicInfo.getCredit() == null) { basicInfo.setCredit(user.getCredit()); } - wxCUserBasicInfoService.updateObj(basicInfo, user.getId()); + wxCUserBasicInfoService.updateObj(basicInfo, user.getId(),user); } else { Date cur = new Date(); WxCUserBasicInfo basicInfo = new WxCUserBasicInfo(); diff --git a/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java b/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java index 6a09bff7c..8d06691b4 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java @@ -4,10 +4,7 @@ import com.github.pagehelper.PageInfo; import com.iformall.domain.dto.WxCUserBasicInfoDto; import com.iformall.domain.dto.WxCUserBasicInfoFilterDto; import com.iformall.domain.dto.WxCUserBasicInfoFilterListDto; -import com.iformall.domain.po.MallUserInfo; -import com.iformall.domain.po.WxCUserBasicInfo; -import com.iformall.domain.po.WxCarPayRecord; -import com.iformall.domain.po.WxTags; +import com.iformall.domain.po.*; import com.iformall.domain.vo.CUserBaseInfoT; import com.iformall.domain.vo.WxTagsGroupVo; @@ -70,7 +67,7 @@ public interface WxCUserBasicInfoService { * * @param record */ - void updateObj(WxCUserBasicInfo record, Long newId); + void updateObj(WxCUserBasicInfo record, Long newId, WxCUser user); /** * 根据Id删除实体 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 c05d33b1b..d2291ee05 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java @@ -594,7 +594,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { } @Override - public void updateObj(WxCUserBasicInfo record, Long newId) { + public void updateObj(WxCUserBasicInfo record, Long newId,WxCUser user) { // 1. update c_user_tags CUserTagNewIdVo userTagVo = new CUserTagNewIdVo(); userTagVo.setTenantId(record.getTenantId()); @@ -620,6 +620,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { CUserBaseVo userBaseVo = new CUserBaseVo(); org.springframework.beans.BeanUtils.copyProperties(record, userBaseVo); userBaseVo.setNewId(newId); + userBaseVo.setCredit(user.getCredit()); + userBaseVo.setPoins(user.getScore()); wxCUserBasicInfoMapper.updateNewId(userBaseVo); } diff --git a/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml b/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml index d58297beb..954b74840 100644 --- a/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml @@ -127,7 +127,7 @@ - update wx_c_user_basic_info set id=#{newId} where tenant_id=#{tenantId} + update wx_c_user_basic_info set id=#{newId} , credit=#{credit} , poins=#{poins} where tenant_id=#{tenantId} and id = #{id} diff --git a/mallinkWebSocketServer/src/main/java/com/iformall/controller/BaseController.java b/mallinkWebSocketServer/src/main/java/com/iformall/controller/BaseController.java index edb551fb7..5a9be8c7f 100644 --- a/mallinkWebSocketServer/src/main/java/com/iformall/controller/BaseController.java +++ b/mallinkWebSocketServer/src/main/java/com/iformall/controller/BaseController.java @@ -137,7 +137,7 @@ public class BaseController { if (basicInfo.getPoins() == null) { basicInfo.setPoins(user.getScore()); } - wxCUserBasicInfoService.updateObj(basicInfo, user.getId()); + wxCUserBasicInfoService.updateObj(basicInfo, user.getId(),user); } else { Date cur = new Date(); WxCUserBasicInfo basicInfo = new WxCUserBasicInfo();