#1. getUserVosPage.mapper 不返回密码,脱密处理。

#2. 后台校验部门名称,修复部门管理能创建相同名字部门的问题。
This commit is contained in:
yangying 2020-04-03 09:27:40 +08:00
parent e151016525
commit 63d5aaf65d
2 changed files with 15 additions and 1 deletions

View File

@ -17,6 +17,7 @@
*/
package com.pig4cloud.pig.admin.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pig4cloud.pig.admin.api.entity.SysDept;
import com.pig4cloud.pig.admin.service.SysDeptService;
import com.pig4cloud.pig.common.core.util.R;
@ -115,4 +116,18 @@ public class DeptController {
sysDept.setUpdateTime(LocalDateTime.now());
return R.ok(sysDeptService.updateDeptById(sysDept));
}
/**
* 根据部门名查询部门信息
*
* @param deptname 部门名
* @return
*/
@GetMapping("/details/{deptname}")
public R user(@PathVariable String deptname) {
SysDept condition = new SysDept();
condition.setName(deptname);
return R.ok(sysDeptService.getOne(new QueryWrapper<>(condition)));
}
}

View File

@ -130,7 +130,6 @@
SELECT
`user`.user_id,
`user`.username,
`user`.`password`,
`user`.salt,
`user`.phone,
`user`.avatar,