Commit 962e6061 by zhouhaibao

fix(store): 优化审批服务异常处理逻辑

- 移除OA审批提交失败时的冗余错误信息前缀
- 在StoreShelfOATemplateValidator中统一异常处理类型
- 将BusinessException改为RpcServiceException进行异常传递
- 保持原始异常信息完整性而非返回布尔值
1 parent 977fe7f0
......@@ -525,7 +525,7 @@ public class StoreApproveServiceImpl implements StoreApproveService {
// 提交OA审批
OAApproveResponse response = oaApproveService.submitApproval(oaRequest);
if (!response.isSuccess()) {
throw new RpcServiceException("OA 审批提交失败:" + response.getMessage());
throw new RpcServiceException(response.getMessage());
}
// 更新审批单状态,解决覆盖更新异常问题
......
......@@ -10,6 +10,7 @@ import cn.com.glsx.dj.oaapproval.model.store.StoreCreateBusinessApprove;
import cn.com.glsx.dj.oaapproval.response.oa.DjContractApproveResponse;
import cn.com.glsx.dj.oaapproval.service.oa.validation.OATemplateValidator;
import cn.com.glsx.dj.oaapproval.util.HttpUtil;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.scrm.wechat.dto.workwechat.oa.request.WorkWechatOAGetTemplateDetailRequestDTO;
import cn.com.glsx.scrm.wechat.dto.workwechat.oa.response.WorkWechatOAGetTemplateDetailResponseDTO;
import cn.com.glsx.scrm.wechat.remote.WorkWechatOARemote;
......@@ -128,9 +129,9 @@ public class StoreShelfOATemplateValidator implements OATemplateValidator {
try {
checkApplyInfoChange(main);
return true;
} catch (BusinessException e) {
} catch (RpcServiceException e) {
log.error("审批信息校验失败: {}", e.getMessage());
return false;
throw e;
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!