|
|
|
@@ -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()); |
|
|
|
|