From 8e5648b9646b12838079d7fbb8335d8743ad5b77 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 16 Sep 2022 10:53:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E7=94=B3=E8=AF=B7=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E4=BC=A0=E7=94=A8=E6=88=B7=E9=83=A8=E9=97=A8id?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=9B=B4=E6=96=B0=E7=94=A8=E6=88=B7=E9=83=A8?= =?UTF-8?q?=E9=97=A8id=EF=BC=88=E5=AD=98=E5=9C=A8=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E9=83=A8=E9=97=A8=E8=A2=AB=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=20=E5=B1=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/AbilityCenterControllerV3.java | 9 ++++++++- .../processForm/dto/TAbilityBatchApplicationDTO.java | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java index 6bd2d812..a9f04c6c 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java @@ -100,7 +100,10 @@ public class AbilityCenterControllerV3 { if (page.getTotal() <= 0) { // return new Result().error("联系管理员添加流程"); } - + // 前端传了部门id,更新该用户部门id + if (abilityBatchApplicationDTO.getDeptId() != null) { + jdbcTemplate.update(String.format("UPDATE sys_user SET dept_id = %d WHERE id = %d;", abilityBatchApplicationDTO.getDeptId(), abilityBatchApplicationDTO.getUserId())); + } List> system_ = jdbcTemplate.queryForList("SELECT `name` AS resourceName,id AS resourceId FROM tb_data_resource WHERE type = '应用资源' AND del_flag = 0;"); if (system_.isEmpty()) { return new Result().error("无应用资源"); @@ -140,6 +143,10 @@ public class AbilityCenterControllerV3 { if (page.getTotal() <= 0) { // return new Result().error("联系管理员添加流程"); } + // 前端传了部门id,更新该用户部门id + if (abilityBatchApplicationDTO.getDeptId() != null) { + jdbcTemplate.update(String.format("UPDATE sys_user SET dept_id = %d WHERE id = %d;", abilityBatchApplicationDTO.getDeptId(), abilityBatchApplicationDTO.getUserId())); + } final String applyFlag = UUID.randomUUID().toString(); abilityBatchApplicationDTO.setApplyFlag(applyFlag); // 同一次的申请标识 logger.info("申请入参{}", JSON.toJSONString(abilityBatchApplicationDTO)); diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java index ce122de8..14a73a3c 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/dto/TAbilityBatchApplicationDTO.java @@ -75,4 +75,7 @@ public class TAbilityBatchApplicationDTO extends AuditingBaseDTO implements Seri @ApiModelProperty(value = "资源所属部门信息") private SysDeptDTO resourceOwnerDept; + + @ApiModelProperty(value = "申请人部门id") + private Long deptId; }