fix:修改单点

This commit is contained in:
zjf committed 2025-04-03 18:10:28 +08:00
1 parent 2151a60a81
commit 80fee23d9b
4 files changed
+15 -3

No files matched your search

@@ -0,0 +1,9 @@
package com.bsd.pjcloud.thirdparty.dto;
import lombok.Data;
@Data
public class UrlTokenDTO {
private String token;
}
@@ -48,6 +48,7 @@ public class ThirdPartyLogController {
@PreAuthorize("@pms.hasPermission('thirdparty_thirdPartyLog_view')" )
public R getThirdPartyLogPage(@ParameterObject Page page, @ParameterObject ThirdPartyLogEntity thirdPartyLog) {
LambdaQueryWrapper<ThirdPartyLogEntity> wrapper = Wrappers.lambdaQuery();
wrapper.orderByDesc(ThirdPartyLogEntity::getCreateTime);
return R.ok(thirdPartyLogService.page(page, wrapper));
}
@@ -10,6 +10,7 @@ import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.log.annotation.SysLog;
import com.bsd.pjcloud.common.security.annotation.Inner;
import com.bsd.pjcloud.thirdparty.dto.SHJNSSODTO;
import com.bsd.pjcloud.thirdparty.dto.UrlTokenDTO;
import com.bsd.pjcloud.thirdparty.dto.ZZDUserDTO;
import com.bsd.pjcloud.thirdparty.entity.ThirdPartyUserEntity;
import com.bsd.pjcloud.thirdparty.service.ThirdPartyOAuth2Service;
@@ -68,13 +69,14 @@ public class ThirdPartyOAth2Cotroller {
* @param token 浙政钉前端获取的token
* @return
*/
@GetMapping("/zzdsso/{token}")
@PostMapping("/zzdsso")
@Operation(summary = "浙政钉单点登录")
@SysLog("浙政钉单点登录")
@Inner(value = false)
@GlobalTransactional
@Transactional(rollbackFor = Exception.class)
public R zzdsso(@PathVariable(name = "token") String token) {
public R zzdsso(@RequestBody UrlTokenDTO urlTokenDTO) {
String token = urlTokenDTO.getToken();
if (StringUtils.isBlank(token)){
return R.failed("token不能为空");
}
@@ -431,7 +431,7 @@ public class ThirdPartyOAuth2Service {
thirdPartyLogEntity.setHttpStatus(response.getStatusCode().toString());
thirdPartyLogEntity.setCreateBy("thirdPartylog");
thirdPartyLogService.saveLog(thirdPartyLogEntity);
throw new RuntimeException("获取浙政钉用户信息失败");
throw new RuntimeException(response.getBody().getDescription());
}
return response.getBody().getData();
} catch (HttpStatusCodeException e) {