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: {}, // 校验规则