From d8d81e835f71cea69de06da584024fcc10c90494 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Fri, 18 Feb 2022 12:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=20master=20=E5=88=86?= =?UTF-8?q?=E6=94=AF,=20=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=85=A5=E6=B5=81?= =?UTF-8?q?=E7=A8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/controller/admin/definition/BpmModelController.java | 1 + .../iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java | 1 + .../module/bpm/service/definition/BpmModelServiceImpl.java | 2 ++ yudao-ui-admin/src/views/bpm/model/index.vue | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java index 1bac1888e..3dd0a0a4d 100644 --- a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java +++ b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/BpmModelController.java @@ -61,6 +61,7 @@ public class BpmModelController { @PostMapping("/import") @ApiOperation(value = "导入模型") + @PreAuthorize("@ss.hasPermission('bpm:model:import')") public CommonResult importModel(@Valid BpmModeImportReqVO importReqVO) throws IOException { BpmModelCreateReqVO createReqVO = BpmModelConvert.INSTANCE.convert(importReqVO); // 读取文件 diff --git a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java index 32f536959..d128dba2c 100644 --- a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/convert/task/BpmTaskConvert.java @@ -108,6 +108,7 @@ public interface BpmTaskConvert { BpmTaskRespVO.User convert3(AdminUserRespDTO bean); + @Mapping(target = "id", ignore = true) void copyTo(BpmTaskExtDO from, @MappingTarget BpmTaskDonePageItemRespVO to); @Mappings({ diff --git a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java index 7c4e0b208..dcb0b9e47 100644 --- a/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmModelServiceImpl.java @@ -132,6 +132,7 @@ public class BpmModelServiceImpl implements BpmModelService { } @Override + @Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务 public void updateModel(@Valid BpmModelUpdateReqVO updateReqVO) { // 校验流程模型存在 Model model = repositoryService.getModel(updateReqVO.getId()); @@ -148,6 +149,7 @@ public class BpmModelServiceImpl implements BpmModelService { } @Override + @Transactional(rollbackFor = Exception.class) // 因为进行多个操作,所以开启事务 public void deployModel(String id) { // 校验流程模型存在 Model model = repositoryService.getModel(id); diff --git a/yudao-ui-admin/src/views/bpm/model/index.vue b/yudao-ui-admin/src/views/bpm/model/index.vue index d3f157b33..029ad9f60 100644 --- a/yudao-ui-admin/src/views/bpm/model/index.vue +++ b/yudao-ui-admin/src/views/bpm/model/index.vue @@ -291,7 +291,7 @@ export default { // 设置上传的请求头部 headers: getBaseHeader(), // 上传的地址 - url: process.env.VUE_APP_BASE_API + '/admin-api/' + "/bpm/model/import", + url: process.env.VUE_APP_BASE_API + '/admin-api' + "/bpm/model/import", // 表单 form: {}, // 校验规则