|
@ -138,19 +138,20 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
case ModuleConstant.AUTHORIZED: //授权成功
|
|
|
case ModuleConstant.AUTHORIZED: //授权成功
|
|
|
// 更改customer_mp 授权信息,appId,并绑定
|
|
|
// 更改customer_mp 授权信息,appId,并绑定
|
|
|
String authCode = result.get(ModuleConstant.AUTHORIZATION_CODE_HUMP); |
|
|
String authCode = result.get(ModuleConstant.AUTHORIZATION_CODE_HUMP); |
|
|
|
|
|
String authAppId = result.get(ModuleConstant.AUTHORIZER_APP_ID_HUMP); |
|
|
log.info("=============================="+authCode); |
|
|
log.info("=============================="+authCode); |
|
|
AuthCodeResultDTO authCodeResultDTO = authCodeDao.selectCustomerIdByAuthCode(authCode); |
|
|
AuthCodeResultDTO authCodeResultDTO = authorizationInfoDao.selectCustomerIdByAuthAppId(authAppId); |
|
|
String clientType = authCodeResultDTO.getClientType(); |
|
|
String clientType = authCodeResultDTO.getClientType(); |
|
|
String customerId = authCodeResultDTO.getCustomerId(); |
|
|
String customerId = authCodeResultDTO.getCustomerId(); |
|
|
Map<String, Object> authorizerRefreshToken = redisThird.getAuthorizerRefreshToken(customerId + ThirdRedisKeyConstant.COLON + clientType); |
|
|
|
|
|
String authAppId = authorizerRefreshToken.get("authorizerAppid").toString(); |
|
|
|
|
|
this.updateCustomerMpAppIdAndCreateOpenPlatform(customerId,authAppId,clientType); |
|
|
this.updateCustomerMpAppIdAndCreateOpenPlatform(customerId,authAppId,clientType); |
|
|
authCodeDao.updateAppId(customerId,clientType,authAppId); |
|
|
authCodeDao.updateAppId(customerId,clientType,authAppId); |
|
|
this.saveAuthAccountInfo(customerId,authAppId,clientType); |
|
|
this.saveAuthAccountInfo(customerId,authAppId,clientType); |
|
|
|
|
|
break; |
|
|
case ModuleConstant.UNAUTHORIZED://用户取消授权
|
|
|
case ModuleConstant.UNAUTHORIZED://用户取消授权
|
|
|
//todo 取消授权
|
|
|
//todo 取消授权
|
|
|
String authorizerAppId = result.get(ModuleConstant.AUTHORIZER_APP_ID_HUMP); |
|
|
String authorizerAppId = result.get(ModuleConstant.AUTHORIZER_APP_ID_HUMP); |
|
|
customerMpDao.updateAuthorizationFlag(authorizerAppId); |
|
|
customerMpDao.updateAuthorizationFlag(authorizerAppId); |
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error(e.getMessage()); |
|
|
log.error(e.getMessage()); |
|
@ -372,7 +373,6 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
String authCode = authCodeAndTime.getAuthCode(); |
|
|
String authCode = authCodeAndTime.getAuthCode(); |
|
|
String client = authCodeAndTime.getClientType(); |
|
|
String client = authCodeAndTime.getClientType(); |
|
|
String expiresIn = authCodeAndTime.getExpiresIn(); |
|
|
String expiresIn = authCodeAndTime.getExpiresIn(); |
|
|
// String customerId = tokenDto.getCustomerId();
|
|
|
|
|
|
String customerId = this.getLoginUserCustomerId(tokenDto); |
|
|
String customerId = this.getLoginUserCustomerId(tokenDto); |
|
|
Date expiresInTime = this.countExpirationTime(expiresIn); |
|
|
Date expiresInTime = this.countExpirationTime(expiresIn); |
|
|
if (StringUtils.isBlank(customerId)||StringUtils.isBlank(client)||StringUtils.isBlank(authCode)||StringUtils.isBlank(expiresIn)){ |
|
|
if (StringUtils.isBlank(customerId)||StringUtils.isBlank(client)||StringUtils.isBlank(authCode)||StringUtils.isBlank(expiresIn)){ |
|
|