From dffa4bf3a81b8bec96763f2377986d49c2597958 Mon Sep 17 00:00:00 2001 From: zhangyue Date: Fri, 24 Apr 2026 15:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=B9=B6=E4=BF=AE=E6=AD=A3=E6=95=B0=E6=8D=AE=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/info/aspect/SyncResponseEncryptAspect.java | 11 ++++++----- .../basic/info/dto/sync/SyncDepartmentQryPageCmd.java | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web-adapter/src/main/java/com/zcloud/basic/info/aspect/SyncResponseEncryptAspect.java b/web-adapter/src/main/java/com/zcloud/basic/info/aspect/SyncResponseEncryptAspect.java index a9dfca9a..3bc7ecb6 100644 --- a/web-adapter/src/main/java/com/zcloud/basic/info/aspect/SyncResponseEncryptAspect.java +++ b/web-adapter/src/main/java/com/zcloud/basic/info/aspect/SyncResponseEncryptAspect.java @@ -1,6 +1,7 @@ package com.zcloud.basic.info.aspect; import com.alibaba.cola.dto.SingleResponse; +import com.alibaba.cola.exception.BizException; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -43,26 +44,26 @@ public class SyncResponseEncryptAspect { String signature = request.getHeader("X-SIGNATURE"); if (corpinfoId == null || timestamp == null || signature == null) { - throw new SecurityException("缺少必要的认证头信息"); + throw new BizException("缺少必要的认证头信息"); } long requestTime = Long.parseLong(timestamp); if (Math.abs(System.currentTimeMillis() - requestTime) > TIMESTAMP_TOLERANCE) { - throw new SecurityException("请求已过期"); + throw new BizException("请求已过期"); } CorpInfoKeyDO keyDO = corpInfoKeyService.getByCorpinfoId(Long.parseLong(corpinfoId)); if (keyDO == null) { - throw new SecurityException("未找到对应的密钥配置"); + throw new BizException("未找到对应的密钥配置"); } if (keyDO.getPublicKey() == null || keyDO.getSignKey() == null) { - throw new SecurityException("密钥配置不完整"); + throw new BizException("密钥配置不完整"); } String body = getRequestBody(joinPoint); if (!sm2Verify(signature, corpinfoId, timestamp, body, keyDO)) { - throw new SecurityException("签名验证失败"); + throw new BizException("签名验证失败"); } Object result = joinPoint.proceed(); diff --git a/web-client/src/main/java/com/zcloud/basic/info/dto/sync/SyncDepartmentQryPageCmd.java b/web-client/src/main/java/com/zcloud/basic/info/dto/sync/SyncDepartmentQryPageCmd.java index 41b9bdd6..a2b4dd31 100644 --- a/web-client/src/main/java/com/zcloud/basic/info/dto/sync/SyncDepartmentQryPageCmd.java +++ b/web-client/src/main/java/com/zcloud/basic/info/dto/sync/SyncDepartmentQryPageCmd.java @@ -30,7 +30,7 @@ public class SyncDepartmentQryPageCmd { @NotNull(message = "corpinfoId不能为空") private Long corpinfoId; private String name; - private String parentId; // 父部门id + private Long parentId; // 父部门id }