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

update ttuser

release_toaliyun_real
xhxu 4 лет назад
Родитель
Сommit
3f3d915cda
4 измененных файлов: 24 добавлений и 3 удалений
  1. +13
    -1
      mallinkCApi/src/main/java/com/iformall/controller/BaseController.java
  2. +1
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxMsgValidationcodeController.java
  3. +5
    -1
      mallinkService/src/main/java/com/iformall/service/cuser/tt/TtCUserServiceAdapter.java
  4. +5
    -0
      mallinkService/src/main/java/com/iformall/service/cuser/wx/WxCUserServiceAdapter.java

+ 13
- 1
mallinkCApi/src/main/java/com/iformall/controller/BaseController.java Просмотреть файл

@@ -6,6 +6,8 @@ import com.iformall.common.IdWorker;
import com.iformall.domain.po.*;
import com.iformall.domain.po.base.BaseCUserEntity;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.tt.TtCUser;
import com.iformall.enums.EnumAppPlat;
import com.iformall.enums.EnumScoreType;
import com.iformall.exception.MallinkException;
import com.iformall.service.*;
@@ -137,7 +139,17 @@ public class BaseController {
if (baseuser.getRealUser() == null) {
throw new MallinkException(ErrorCode.USER_IS_EMPTY);
}
CUser user = RedisCacheUtils.getFieldObject(baseuser, "realUser", CUser.class);
CUser user = null;
if(EnumAppPlat.WX.equals(baseuser.getAppPlat())){
user = RedisCacheUtils.getFieldObject(baseuser, "realUser", WxCUser.class);
}else if(EnumAppPlat.TOUTIAO.equals(baseuser.getAppPlat())){
user = RedisCacheUtils.getFieldObject(baseuser, "realUser", TtCUser.class);
}else{
user = RedisCacheUtils.getFieldObject(baseuser, "realUser", CUser.class);
}
if(user == null){
throw new MallinkException(ErrorCode.USER_IS_EMPTY);
}
TenantEntity tenantEntity = getTenantInfo();
if (user.getTenantId() == null) {
user.setTenantId(tenantEntity.getTenantId());


+ 1
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxMsgValidationcodeController.java Просмотреть файл

@@ -71,7 +71,7 @@ public class WxMsgValidationcodeController extends BaseController {
wxMsgValidationcode.setPhone(phone);
wxMsgValidationcode.setType(type);
wxMsgValidationcode.setCode(code);
//只需要一端发就可以了
//只需要一端发就可以了
WxAppinfo appinfo = WxAppinfoService.getCAppInfo(getTenantInfo(), EnumAppPlat.WX);
wxMsgValidationcode.setAppid(appinfo.getAppId());
//wxMsgValidationcode.setAppid(user.getAppId());


+ 5
- 1
mallinkService/src/main/java/com/iformall/service/cuser/tt/TtCUserServiceAdapter.java Просмотреть файл

@@ -19,7 +19,6 @@ import com.iformall.service.WxCUserBasicInfoService;
import com.iformall.service.WxCUserTagsService;
import com.iformall.service.cuser.BasicCUserService;
import com.iformall.service.cuser.CUserServiceApapter;
import com.iformall.service.cuser.CUserServiceFactory;
import com.iformall.utils.Constant;
import com.iformall.utils.MaUtil;
import lombok.SneakyThrows;
@@ -60,6 +59,7 @@ public class TtCUserServiceAdapter extends BasicCUserService implements CUserSer
entity.setUserId(ttCUser.getUserId());
entity.setToken(ttCUser.getToken());
entity.updateTenantInfo(ttCUser);
entity.setAppPlat(EnumAppPlat.TOUTIAO);
entity.setRealUser(ttCUser);
return entity;
}
@@ -252,6 +252,10 @@ public class TtCUserServiceAdapter extends BasicCUserService implements CUserSer

@Override
public void updateMsgCount(CUser user) {
// TtCUser userL = new TtCUser();
// userL.setId(user.getId());
// userL.updateTenantInfo(user);
// ttCUserMapper.updateMsgCount(userL);
ttCUserMapper.updateMsgCount((TtCUser) user);
}



+ 5
- 0
mallinkService/src/main/java/com/iformall/service/cuser/wx/WxCUserServiceAdapter.java Просмотреть файл

@@ -63,6 +63,7 @@ public class WxCUserServiceAdapter extends BasicCUserService implements CUserSer
entity.setUserId(wxCUser.getUserId());
entity.setToken(wxCUser.getToken());
entity.updateTenantInfo(wxCUser);
entity.setAppPlat(EnumAppPlat.WX);
entity.setRealUser(wxCUser);
return entity;
}
@@ -255,6 +256,10 @@ public class WxCUserServiceAdapter extends BasicCUserService implements CUserSer

@Override
public void updateMsgCount(CUser user) {
// WxCUser userL = new WxCUser();
// userL.setId(user.getId());
// userL.updateTenantInfo(user);
// wxCUserMapper.updateMsgCount(userL);
wxCUserMapper.updateMsgCount((WxCUser) user);
}



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