|
|
@ -764,7 +764,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
resDTO.setRegFlag(resiResDTO.getRegFlag()); |
|
|
|
|
|
|
|
//3.生成token,并且存放Redis
|
|
|
|
String token=this.saveTokenDtoDing(AppClientConstant.APP_RESI,AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId()); |
|
|
|
String token=this.saveTokenDtoDing(formDTO.getClientId(),AppClientConstant.APP_RESI,AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId()); |
|
|
|
resDTO.setAuthorization(token); |
|
|
|
|
|
|
|
} catch (ApiException e) { |
|
|
@ -773,11 +773,11 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
return resDTO; |
|
|
|
} |
|
|
|
|
|
|
|
private String saveTokenDtoDing(String app,String client, String userId,String customerId) { |
|
|
|
private String saveTokenDtoDing(String suiteKey,String app,String client, String userId,String customerId) { |
|
|
|
//生成token串
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put(AppClientConstant.APP, AppClientConstant.APP_RESI); |
|
|
|
map.put(AppClientConstant.CLIENT, AppClientConstant.MINI_DING); |
|
|
|
map.put(AppClientConstant.APP, app); |
|
|
|
map.put(AppClientConstant.CLIENT, client); |
|
|
|
map.put("userId", userId); |
|
|
|
String token = jwtTokenUtils.createToken(map); |
|
|
|
int expire = jwtTokenProperties.getExpire(); |
|
|
@ -789,7 +789,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
tokenDto.setToken(token); |
|
|
|
tokenDto.setUpdateTime(System.currentTimeMillis()); |
|
|
|
tokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime()); |
|
|
|
cpUserDetailRedis.set(tokenDto, expire); |
|
|
|
// cpUserDetailRedis.set(tokenDto, expire);
|
|
|
|
cpUserDetailRedis.setForDingApp(suiteKey,tokenDto, expire); |
|
|
|
logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
return token; |
|
|
|
} |
|
|
@ -838,7 +839,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
// 2、调用userfeign接口获取userId、注册网格相关信息 todo
|
|
|
|
|
|
|
|
//3.生成token,并且存放Redis
|
|
|
|
String token=this.saveTokenDtoDing(AppClientConstant.APP_RESI,AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId()); |
|
|
|
String token=this.saveTokenDtoDing(clientId,AppClientConstant.APP_RESI,AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId()); |
|
|
|
resDTO.setAuthorization(token); |
|
|
|
|
|
|
|
} catch (ApiException e) { |
|
|
|