From 80cb1b7570ceed92a1f5e70603e60284e44350b3 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 27 Apr 2022 16:52:59 +0800 Subject: [PATCH] ... --- .../listener/ResourceOwnerListener.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java index 9aa6f696..3cf51b2e 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/listener/ResourceOwnerListener.java @@ -5,13 +5,13 @@ import com.google.gson.Gson; import com.google.gson.JsonElement; import io.renren.modules.processForm.service.ApiGatewayService; import io.renren.modules.resource.dto.ResourceDTO; +import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO; import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.dto.SysRoleDTO; import io.renren.modules.sys.dto.SysUserDTO; import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysRoleService; -import io.renren.modules.sys.service.SysRoleUserService; import io.renren.modules.sys.service.SysUserService; import org.activiti.engine.TaskService; import org.activiti.engine.delegate.*; @@ -47,6 +47,8 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A private ApiGatewayService apiGatewayService; @Autowired private SysDeptService sysDeptService; + @Autowired + private ResourceService resourceService; @Override public void notify(DelegateExecution execution) throws Exception { @@ -108,8 +110,15 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A TResourceMountApplyDTO resourceMountApplyDTO = gson.fromJson(jsonElement, TResourceMountApplyDTO.class); Long resourceID = resourceMountApplyDTO.getResourceDTO().getId(); apiGatewayService.registerApi2Gateway(String.valueOf(resourceID)); + + ResourceDTO re = resourceMountApplyDTO.getResourceDTO(); + if (re != null) { + re.setDelFlag(0); + resourceService.update(re); + } } + /** * 节点创建时动态分配资源部门审核人 *