mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-12 05:39:00 +08:00
♻️ Refactoring code. 部门组织架构后端调整
This commit is contained in:
1 parent
7460562571
commit
018768a15e
2 files changed
+36
No files matched your search
+20
@@ -155,4 +155,24 @@ public class SysDeptController {
|
||||
return sysDeptService.importDept(excelVOList, bindingResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部部门包含用户
|
||||
* @param parentDeptId 父部门ID
|
||||
* @param type 查询类型
|
||||
*/
|
||||
@GetMapping("/org")
|
||||
public R listOrgTree(Long parentDeptId, String type) {
|
||||
return R.ok(sysDeptService.listOrgTree(parentDeptId, type));
|
||||
}
|
||||
|
||||
/**
|
||||
* 模糊搜索用户
|
||||
* @param username 用户名/拼音/首字母
|
||||
* @return 匹配到的用户
|
||||
*/
|
||||
@GetMapping("/org/user/search")
|
||||
public R getOrgTreeUser(@RequestParam String username) {
|
||||
return R.ok(sysDeptService.getOrgTreeUser(username));
|
||||
}
|
||||
|
||||
}
|
||||
+16
@@ -23,10 +23,12 @@ import cn.hutool.core.lang.tree.Tree;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.pig4cloud.pigx.admin.api.entity.SysDept;
|
||||
import com.pig4cloud.pigx.admin.api.vo.DeptExcelVO;
|
||||
import com.pig4cloud.pigx.admin.api.vo.OrgTreeVO;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import org.springframework.validation.BindingResult;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -70,4 +72,18 @@ public interface SysDeptService extends IService<SysDept> {
|
||||
*/
|
||||
List<Long> listDeptLeader(Long deptId);
|
||||
|
||||
/**
|
||||
* 查询全部部门包含用户
|
||||
* @param parentDeptId 父部门ID
|
||||
* @param type 查询类型
|
||||
*/
|
||||
Map<String, Object> listOrgTree(Long parentDeptId, String type);
|
||||
|
||||
/**
|
||||
* 根据用户名模糊搜索用户
|
||||
* @param username 用户名
|
||||
* @return List user
|
||||
*/
|
||||
List<OrgTreeVO> getOrgTreeUser(String username);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user