修改小程序用户信息报错问题
This commit is contained in:
parent
d5bfa1ccc5
commit
376f3bd4f7
@ -430,56 +430,59 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult appInfo(HttpServletRequest request) {
|
public AjaxResult appInfo(HttpServletRequest request) {
|
||||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
try{
|
||||||
Object version = redisService.getCacheObject("global:version");
|
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||||
Object servicePhone = redisService.getCacheObject("global:phone");
|
Object version = redisService.getCacheObject("global:version");
|
||||||
//根据不同的用户类型查询不同的信息
|
Object servicePhone = redisService.getCacheObject("global:phone");
|
||||||
Long userid = loginUser.getUserid();
|
//根据不同的用户类型查询不同的信息
|
||||||
Integer userType = loginUser.getUserType();
|
Long userid = loginUser.getUserid();
|
||||||
R user = userTypeService.getUser(null, loginUser.getUserid(), loginUser.getUserType(), null,loginUser.getTenantId());
|
Integer userType = loginUser.getUserType();
|
||||||
if(user !=null && user.getData() !=null){
|
R user = userTypeService.getUser(null, loginUser.getUserid(), loginUser.getUserType(), null,loginUser.getTenantId());
|
||||||
Map<String, Object> map = (Map<String, Object>)user.getData();
|
if(user !=null && user.getData() !=null){
|
||||||
//发票、留言板、版本、客服电话
|
Map<String, Object> map = (Map<String, Object>)user.getData();
|
||||||
Integer invoice =null;
|
//发票、留言板、版本、客服电话
|
||||||
if(UserTypeUtil.USER_TYPE.equals(userType)){
|
Integer invoice =null;
|
||||||
invoice = redisService.getCacheObject("global:invoice:" + UserTypeUtil.USER + userid);
|
if(UserTypeUtil.USER_TYPE.equals(userType)){
|
||||||
}else if(UserTypeUtil.INTERNET_TYPE.equals(userType)){
|
invoice = redisService.getCacheObject("global:invoice:" + UserTypeUtil.USER + userid);
|
||||||
invoice = redisService.getCacheObject("global:invoice:"+UserTypeUtil.INTERNET+userid);
|
}else if(UserTypeUtil.INTERNET_TYPE.equals(userType)){
|
||||||
}else if(UserTypeUtil.COMMUNIT_TYPE.equals(userType)){
|
invoice = redisService.getCacheObject("global:invoice:"+UserTypeUtil.INTERNET+userid);
|
||||||
invoice = redisService.getCacheObject("global:invoice:"+UserTypeUtil.COMMUNIT+userid);
|
}else if(UserTypeUtil.COMMUNIT_TYPE.equals(userType)){
|
||||||
|
invoice = redisService.getCacheObject("global:invoice:"+UserTypeUtil.COMMUNIT+userid);
|
||||||
|
}else{
|
||||||
|
invoice = redisService.getCacheObject("global:invoice:"+UserTypeUtil.CUSTOMERS+userid);
|
||||||
|
}
|
||||||
|
if(invoice==null){
|
||||||
|
map.put("invoiceNumber","0");
|
||||||
|
}else{
|
||||||
|
map.put("invoiceNumber",invoice);
|
||||||
|
}
|
||||||
|
Integer guestbook =null;
|
||||||
|
if(UserTypeUtil.USER_TYPE.equals(userType)){
|
||||||
|
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.USER_TYPE + ":" + map.get("phone").toString() + ":0:" + loginUser.getTenantId());
|
||||||
|
}else if(UserTypeUtil.INTERNET_TYPE.equals(userType)){
|
||||||
|
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.INTERNET_TYPE + ":" + map.get("phone").toString() + ":0:" + loginUser.getTenantId());
|
||||||
|
}else if(UserTypeUtil.COMMUNIT_TYPE.equals(userType)){
|
||||||
|
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.COMMUNIT_TYPE + ":" + map.get("account").toString() + ":0:" + loginUser.getTenantId());
|
||||||
|
}else{
|
||||||
|
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.CUSTOMERS_TYPE + ":" + map.get("account").toString() + ":0:" + loginUser.getTenantId());
|
||||||
|
}
|
||||||
|
if(guestbook==null){
|
||||||
|
map.put("guestbook","0");
|
||||||
|
}else{
|
||||||
|
map.put("guestbook",guestbook);
|
||||||
|
}
|
||||||
|
map.put("version",version);
|
||||||
|
map.put("servicePhone",servicePhone);
|
||||||
|
map.put("activity",0);
|
||||||
|
map.put("activitySize",1);
|
||||||
|
map.put("activityImg","https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/bunengshanchu/1.png");
|
||||||
|
map.put("socSize",redisService.getCacheObject("global:SOC"));
|
||||||
|
return AjaxResult.success(map);
|
||||||
}else{
|
}else{
|
||||||
invoice = redisService.getCacheObject("global:invoice:"+UserTypeUtil.CUSTOMERS+userid);
|
return AjaxResult.error("请重新登录",HttpStatus.USER_LOGIN);
|
||||||
}
|
}
|
||||||
if(invoice==null){
|
}catch (Exception e){
|
||||||
map.put("invoiceNumber","0");
|
return AjaxResult.error("请重新登录",HttpStatus.USER_LOGIN);
|
||||||
}else{
|
|
||||||
map.put("invoiceNumber",invoice);
|
|
||||||
}
|
|
||||||
Integer guestbook =null;
|
|
||||||
if(UserTypeUtil.USER_TYPE.equals(userType)){
|
|
||||||
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.USER_TYPE + ":" + map.get("phone").toString() + ":0:" + loginUser.getTenantId());
|
|
||||||
}else if(UserTypeUtil.INTERNET_TYPE.equals(userType)){
|
|
||||||
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.INTERNET_TYPE + ":" + map.get("phone").toString() + ":0:" + loginUser.getTenantId());
|
|
||||||
}else if(UserTypeUtil.COMMUNIT_TYPE.equals(userType)){
|
|
||||||
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.COMMUNIT_TYPE + ":" + map.get("account").toString() + ":0:" + loginUser.getTenantId());
|
|
||||||
}else{
|
|
||||||
guestbook = redisService.getCacheObject("userNotReadMessageCount:"+UserTypeUtil.CUSTOMERS_TYPE + ":" + map.get("account").toString() + ":0:" + loginUser.getTenantId());
|
|
||||||
}
|
|
||||||
if(guestbook==null){
|
|
||||||
map.put("guestbook","0");
|
|
||||||
}else{
|
|
||||||
map.put("guestbook",guestbook);
|
|
||||||
}
|
|
||||||
map.put("version",version);
|
|
||||||
map.put("servicePhone",servicePhone);
|
|
||||||
map.put("activity",0);
|
|
||||||
map.put("activitySize",1);
|
|
||||||
map.put("activityImg","https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/bunengshanchu/1.png");
|
|
||||||
map.put("socSize",redisService.getCacheObject("global:SOC"));
|
|
||||||
|
|
||||||
return AjaxResult.success(map);
|
|
||||||
}else{
|
|
||||||
return AjaxResult.error("请重新登录");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user