add - 新增升级脚本的执行逻辑, 确保以后的版本迭代只需要保证脚本执行正常即可.

This commit is contained in:
wangli 2024-01-22 18:13:24 +08:00
parent 0144b07541
commit f8448fe4fe
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public class DingTalkUtils {
markdown.setTitle("Notice 流程实例创建失败, Env: " + profile); markdown.setTitle("Notice 流程实例创建失败, Env: " + profile);
markdown.setText("#### [" + profile + "]流程实例创建失败\n" + markdown.setText("#### [" + profile + "]流程实例创建失败\n" +
"> 创建参数: " + JSON.toJSONString(req) + "\n\n" + "> 创建参数: " + JSON.toJSONString(req) + "\n\n" +
"> ###### 异常信息: " + JSON.toJSONString(throwable) + " \n"); "> ###### 异常信息: " + JSON.toJSONString(throwable.getCause().getMessage()) + " \n");
request.setMarkdown(markdown); request.setMarkdown(markdown);
OapiRobotSendResponse response = client.execute(request); OapiRobotSendResponse response = client.execute(request);
} }

View File

@ -18,6 +18,7 @@ import cn.axzo.workflow.core.service.BpmnProcessInstanceService;
import cn.axzo.workflow.server.common.annotation.RepeatSubmit; import cn.axzo.workflow.server.common.annotation.RepeatSubmit;
import cn.axzo.workflow.server.common.util.DingTalkUtils; import cn.axzo.workflow.server.common.util.DingTalkUtils;
import cn.azxo.framework.common.model.CommonResponse; import cn.azxo.framework.common.model.CommonResponse;
import cn.azxo.framework.common.utils.LogUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.ObjectNode;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@ -80,7 +81,7 @@ public class BpmnProcessInstanceController implements ProcessInstanceApi {
try { try {
result = bpmnProcessInstanceService.createProcessInstance(dto); result = bpmnProcessInstanceService.createProcessInstance(dto);
} catch (Exception e) { } catch (Exception e) {
log.error("发起审核createProcessInstance===>>>异常:{}", e.getMessage()); LogUtil.error(LogUtil.ErrorType.ERROR_BUSINESS, "发起审核createProcessInstance===>>>异常:{}", e.getMessage());
DingTalkUtils.sendDingTalk(profile, dto, e); DingTalkUtils.sendDingTalk(profile, dto, e);
return CommonResponse.fail(e.getMessage()); return CommonResponse.fail(e.getMessage());
} }