文档库--推送模糊查询
This commit is contained in:
+34
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.PermissionData;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
@@ -30,6 +31,7 @@ import com.jero.modules.system.model.SysUserSysDepartModel;
|
||||
import com.jero.modules.system.service.*;
|
||||
import com.jero.modules.system.vo.SysDepartUsersVO;
|
||||
import com.jero.modules.system.vo.SysPushVO;
|
||||
import com.jero.modules.system.vo.SysUserDepartVO;
|
||||
import com.jero.modules.system.vo.SysUserRoleVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -1460,6 +1462,38 @@ public class SysUserController {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "文档库推送部门和人员的模糊搜索")
|
||||
@ApiOperation(value="文档库推送部门和人员的模糊搜索", notes="文档库推送部门和人员的模糊搜索")
|
||||
@GetMapping(value = "/getUserAndDepart")
|
||||
public List<SysUserDepartVO> getUserAndDepart(String name){
|
||||
LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.like(SysUser::getRealname,name);
|
||||
List<SysUser> sysUserList = sysUserService.list(lambdaQueryWrapper);
|
||||
|
||||
LambdaQueryWrapper<SysDepart> wrapper = new LambdaQueryWrapper<>();
|
||||
List<SysDepart> sysDepartList = sysDepartService.list(wrapper);
|
||||
|
||||
List<SysUserDepartVO> list = new LinkedList<>();
|
||||
if(sysDepartList.size() != 0){
|
||||
for (SysDepart sysDepart : sysDepartList) {
|
||||
SysUserDepartVO sysUserDepartVO = new SysUserDepartVO();
|
||||
sysUserDepartVO.setKey(sysDepart.getId());
|
||||
sysUserDepartVO.setTitle(sysDepart.getDepartName());
|
||||
list.add(sysUserDepartVO);
|
||||
}
|
||||
}
|
||||
if(sysUserList.size() != 0){
|
||||
for (SysUser sysUser : sysUserList) {
|
||||
SysUserDepartVO sysUserDepartVO = new SysUserDepartVO();
|
||||
sysUserDepartVO.setKey(sysUser.getId());
|
||||
sysUserDepartVO.setTitle(sysUser.getRealname());
|
||||
list.add(sysUserDepartVO);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理树状结构
|
||||
*
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.jero.modules.system.vo;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @date 2022/3/31 11:35
|
||||
* @auth zhn
|
||||
*/
|
||||
public class SysUserDepartVO {
|
||||
|
||||
private String key;
|
||||
|
||||
private String title;
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user