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; }