能力申请前端传用户部门id时,更新用户部门id(存在用户原有部门被删除的情况 屮)
This commit is contained in:
parent
e539922487
commit
8e5648b964
|
@ -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<Map<String, Object>> 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));
|
||||
|
|
|
@ -75,4 +75,7 @@ public class TAbilityBatchApplicationDTO extends AuditingBaseDTO implements Seri
|
|||
|
||||
@ApiModelProperty(value = "资源所属部门信息")
|
||||
private SysDeptDTO resourceOwnerDept;
|
||||
|
||||
@ApiModelProperty(value = "申请人部门id")
|
||||
private Long deptId;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue