!47 脱密处理和创建相同部门名称的问题

Merge pull request !47 from 自省/master
This commit is contained in:
pig4cloud.com 2020-04-03 09:56:30 +08:00 committed by Gitee
commit 0e24548d7a
2 changed files with 15 additions and 1 deletions

View File

@ -17,6 +17,7 @@
*/ */
package com.pig4cloud.pig.admin.controller; 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.api.entity.SysDept;
import com.pig4cloud.pig.admin.service.SysDeptService; import com.pig4cloud.pig.admin.service.SysDeptService;
import com.pig4cloud.pig.common.core.util.R; import com.pig4cloud.pig.common.core.util.R;
@ -115,4 +116,18 @@ public class DeptController {
sysDept.setUpdateTime(LocalDateTime.now()); sysDept.setUpdateTime(LocalDateTime.now());
return R.ok(sysDeptService.updateDeptById(sysDept)); 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 SELECT
`user`.user_id, `user`.user_id,
`user`.username, `user`.username,
`user`.`password`,
`user`.salt, `user`.salt,
`user`.phone, `user`.phone,
`user`.avatar, `user`.avatar,