根据ticket获取用户信息

This commit is contained in:
chy
2026-03-10 11:09:46 +08:00
parent f494611789
commit 43e66ea9c6
8 changed files with 17 additions and 7 deletions

View File

@@ -13,8 +13,8 @@ import org.springframework.stereotype.Component;
* 同步销售明细表
* oracle gryybi GR_BI_SA_SETDTL --> mysql erp_bi_data GR_BI_SA_SETDTL
*/
@Component
@Slf4j
@Component("SaSetdtlSyncJob")
public class SaSetdtlSyncJob implements JobHandler {
@Autowired

View File

@@ -60,9 +60,6 @@ public class anyToGrBiSasetdtl implements JobHandler {
while (rs.next()) {
//写入到数据中台表
System.out.println(rs.getString("SASETTLEDTLID"));
}

View File

@@ -166,7 +166,8 @@ public class AuthController {
@Parameter(name = "refreshToken", description = "根据token获取用户信息", required = true)
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public CommonResult<AuthLoginRespVO> getUerInfo(@RequestParam("refreshToken") String refreshToken) {
return success(authService.refreshToken(refreshToken));
//跟
return success(authService.getTokenTouserInfo(refreshToken));
}
@GetMapping("/get-permission-info")

View File

@@ -73,7 +73,7 @@ public class OAuth2ClientController {
@GetMapping("/myPage")
@Operation(tags = "OAuth2.0管理",summary = "获得用户角色下 OAuth2 客户端分页")
@PreAuthorize("@ss.hasPermission('system:oauth2-client:query')")
// @PreAuthorize("@ss.hasPermission('system:oauth2-client:query')")
public CommonResult<PageResult<OAuth2ClientRespVO>> getMyPage(@Valid OAuth2ClientPageReqVO pageVO) {
PageResult<OAuth2ClientDO> pageResult = oAuth2ClientService.getMyPage(pageVO);
return success(BeanUtils.toBean(pageResult, OAuth2ClientRespVO.class));

View File

@@ -78,4 +78,6 @@ public interface IAdminAuthService {
*/
AuthLoginRespVO refreshToken(String refreshToken);
AuthLoginRespVO getTokenTouserInfo(String refreshToken);
}

View File

@@ -41,6 +41,7 @@ public interface IOAuth2TokenService {
*/
OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId);
/**
* 获得访问令牌
*

View File

@@ -362,6 +362,15 @@ public class AdminAuthServiceImpl implements IAdminAuthService {
return AuthConvert.INSTANCE.convert(accessTokenDO);
}
@Override
public AuthLoginRespVO getTokenTouserInfo(String refreshToken) {
OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.refreshAccessToken(refreshToken, OAuth2ClientConstants.CLIENT_ID_DEFAULT);
return AuthConvert.INSTANCE.convert(accessTokenDO);
}
@Override
public void logout(String token, Integer logType) {
// 删除访问令牌