修改小程序用戶獲取信息
This commit is contained in:
parent
8afe372b62
commit
e78536738f
@ -504,13 +504,14 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
|
||||
//终端信息
|
||||
XhpcTerminal xhpcTerminal = xhpcChargeOrderMapper.getXhpcTerminalSerialNumber(connectorId,null);
|
||||
if (xhpcTerminal == null || xhpcTerminal.getTerminalId() == null || xhpcTerminal.getChargingPileId() == null || xhpcTerminal.getPileSerialNumber() == null) {
|
||||
r.setCode(1);
|
||||
String pilePrompt = redisService.getCacheObject("pilePrompt:000000");
|
||||
if(!"".equals(pilePrompt) && pilePrompt !=null){
|
||||
r.setMsg(pilePrompt);
|
||||
}else{
|
||||
r.setMsg("因限电该桩已停用,请选择其他桩进行充电");
|
||||
}
|
||||
r.setCode(500);
|
||||
// String pilePrompt = redisService.getCacheObject("pilePrompt:000000");
|
||||
// if(!"".equals(pilePrompt) && pilePrompt !=null){
|
||||
// r.setMsg(pilePrompt);
|
||||
// }else{
|
||||
// r.setMsg("因限电该桩已停用,请选择其他桩进行充电");
|
||||
// }
|
||||
r.setMsg("因限电该桩已停用请选择其他桩进行充电");
|
||||
return r;
|
||||
}
|
||||
//终端状态是否空闲
|
||||
|
||||
@ -14,10 +14,10 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 172.31.183.135:8848
|
||||
server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 172.31.183.135:8848
|
||||
server-addr: mse-e2a05960-nacos-ans.mse.aliyuncs.com:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
||||
@ -430,24 +430,28 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
||||
*/
|
||||
@Override
|
||||
public R<?> voluntaryLogin(Map<String, Object> map) {
|
||||
String type = StringUtils.valueOf(map.get("type"));
|
||||
String openid = StringUtils.valueOf(map.get("openid"));
|
||||
String tenantId = StringUtils.valueOf(map.get("tenantId"));
|
||||
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
|
||||
logger.info("<<<<<<<<<<自动登录openid>>>>>>>>>>>>"+openid);
|
||||
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
|
||||
Map<String, Object> userLoginTime = xhpcAppUserMapper.getUserLoginTime(Integer.valueOf(type), openid,tenantId);
|
||||
if(userLoginTime ==null){
|
||||
return R.fail(HttpStatus.USER_LOGIN, "请重新登录");
|
||||
}
|
||||
logger.info("-------userLoginTime---" + userLoginTime);
|
||||
if(userLoginTime.get("status") == null){
|
||||
return R.fail(HttpStatus.USER_LOGIN, "请重新登录");
|
||||
} else if(UserTypeUtil.NO_LOGIN.equals(userLoginTime.get("status").toString())){
|
||||
return R.fail(HttpStatus.USER_LOGIN, "请重新登录");
|
||||
}
|
||||
logger.info("-------status---"+userLoginTime.get("status").toString());
|
||||
return appLogin(userLoginTime.get("account").toString(), type, openid, tenantId);
|
||||
try{
|
||||
String type = StringUtils.valueOf(map.get("type"));
|
||||
String openid = StringUtils.valueOf(map.get("openid"));
|
||||
String tenantId = StringUtils.valueOf(map.get("tenantId"));
|
||||
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
|
||||
logger.info("<<<<<<<<<<自动登录openid>>>>>>>>>>>>"+openid);
|
||||
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
|
||||
Map<String, Object> userLoginTime = xhpcAppUserMapper.getUserLoginTime(Integer.valueOf(type), openid,tenantId);
|
||||
if(userLoginTime ==null){
|
||||
return R.fail(HttpStatus.USER_LOGIN, "请重新登录");
|
||||
}
|
||||
logger.info("-------userLoginTime---" + userLoginTime);
|
||||
if(userLoginTime.get("status") == null){
|
||||
return R.fail(HttpStatus.USER_LOGIN, "请重新登录");
|
||||
} else if(UserTypeUtil.NO_LOGIN.equals(userLoginTime.get("status").toString())){
|
||||
return R.fail(HttpStatus.USER_LOGIN, "请重新登录");
|
||||
}
|
||||
logger.info("-------status---"+userLoginTime.get("status").toString());
|
||||
return appLogin(userLoginTime.get("account").toString(), type, openid, tenantId);
|
||||
}catch (Exception e){
|
||||
return R.fail(HttpStatus.USER_LOGIN, "请重新登录");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -525,6 +529,7 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.info("-------appInfo----请重新登录---");
|
||||
return AjaxResult.error("请重新登录",HttpStatus.USER_LOGIN);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user