|
@ -370,7 +370,6 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
* @Description 获取/刷新接口调用令牌 |
|
|
* @Description 获取/刷新接口调用令牌 |
|
|
* @author zxc |
|
|
* @author zxc |
|
|
*/ |
|
|
*/ |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void refreshToken() { |
|
|
public void refreshToken() { |
|
|
//查询 即将过期的 authorizer_access_token
|
|
|
//查询 即将过期的 authorizer_access_token
|
|
@ -407,9 +406,8 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
AuthorizationInfoFormDTO authorizationInfo = new AuthorizationInfoFormDTO(); |
|
|
AuthorizationInfoFormDTO authorizationInfo = new AuthorizationInfoFormDTO(); |
|
|
BeanUtils.copyProperties(formDTO, authorizationInfo); |
|
|
BeanUtils.copyProperties(formDTO, authorizationInfo); |
|
|
authorizationInfo.setAuthorizerAppid(authAppId); |
|
|
authorizationInfo.setAuthorizerAppid(authAppId); |
|
|
//先逻辑删除,在插入
|
|
|
// 先逻辑删除,在插入
|
|
|
authorizationInfoDao.deleteOldAuthorizerAccessToken(customerId, clientType); |
|
|
deleteOldAuthorizerAccessTokenAndInsert(customerId,clientType,formDTO); |
|
|
authorizationInfoDao.insertAuthorizerAccessToken(formDTO); |
|
|
|
|
|
//缓存 refreshAuthorizerAccessToken
|
|
|
//缓存 refreshAuthorizerAccessToken
|
|
|
redisThird.setAuthorizerRefreshToken(authorizationInfo); |
|
|
redisThird.setAuthorizerRefreshToken(authorizationInfo); |
|
|
AuthorizationInfoResultDTO resultDTO = new AuthorizationInfoResultDTO(); |
|
|
AuthorizationInfoResultDTO resultDTO = new AuthorizationInfoResultDTO(); |
|
@ -425,6 +423,21 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 删除旧的AuthorizerAccessToken,并新增AuthorizerAccessToken |
|
|
|
|
|
* @param customerId |
|
|
|
|
|
* @param clientType |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/7/12 09:15 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
public void deleteOldAuthorizerAccessTokenAndInsert(String customerId,String clientType,AuthorizerAccessTokenFormDTO formDTO){ |
|
|
|
|
|
//先逻辑删除,在插入
|
|
|
|
|
|
authorizationInfoDao.deleteOldAuthorizerAccessToken(customerId, clientType); |
|
|
|
|
|
authorizationInfoDao.insertAuthorizerAccessToken(formDTO); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param |
|
|
* @param |
|
|
* @Description 授权回调URL, 回调时并获取授权信息 |
|
|
* @Description 授权回调URL, 回调时并获取授权信息 |
|
|