fix:【system】refreshAccessToken 时,抛出 UNAUTHORIZED 导致回滚,对应 https://gitee.com/zhijiantianya/yudao-cloud/issues/IDL4OW

This commit is contained in:
YunaiV
2026-01-25 20:56:55 +08:00
parent 0c0a6ae40a
commit 1233921b86

View File

@@ -6,6 +6,7 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
@@ -68,7 +69,7 @@ public class OAuth2TokenServiceImpl implements OAuth2TokenService {
}
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(noRollbackFor = ServiceException.class)
public OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId) {
// 查询访问令牌
OAuth2RefreshTokenDO refreshTokenDO = oauth2RefreshTokenMapper.selectByRefreshToken(refreshToken);