Просмотр исходного кода

[修复]C端授权登录后积分和成长值不一致问题

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
f2275aee80
5 измененных файлов: 8 добавлений и 9 удалений
  1. +1
    -1
      mallinkCApi/src/main/java/com/iformall/controller/BaseController.java
  2. +2
    -5
      mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
  3. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  4. +1
    -1
      mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml
  5. +1
    -1
      mallinkWebSocketServer/src/main/java/com/iformall/controller/BaseController.java

+ 1
- 1
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();


+ 2
- 5
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删除实体


+ 3
- 1
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);
}



+ 1
- 1
mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml Просмотреть файл

@@ -127,7 +127,7 @@
</update>

<update id="updateNewId" parameterType="com.iformall.domain.vo.CUserBaseVo">
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}
</update>



+ 1
- 1
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();


Загрузка…
Отмена
Сохранить