fix(联络人管理): 81037
This commit is contained in:
@@ -87,4 +87,9 @@ public class LawsContactManage implements Serializable {
|
||||
@ApiModelProperty(value = "部门联络人主管级领导id")
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
private java.lang.String leaderId;
|
||||
|
||||
/**联络人 搜索用*/
|
||||
@ApiModelProperty(value = "联络人 搜索用")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String contact;
|
||||
}
|
||||
|
||||
+9
@@ -23,6 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@@ -52,6 +53,14 @@ public class LawsContactManageServiceImpl extends ServiceImpl<LawsContactManageM
|
||||
public IPage<LawsContactManage> queryPage(LawsContactManage lawsContactManage, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsContactManage> queryWrapper = QueryGenerator.initQueryWrapper(lawsContactManage, req.getParameterMap());
|
||||
if (StringUtils.isNotBlank(lawsContactManage.getContact())){
|
||||
List<SysUser> userList = sysUserService.list(new LambdaQueryWrapper<SysUser>()
|
||||
.like(SysUser::getRealname, lawsContactManage.getContact()));
|
||||
if (userList.isEmpty()){
|
||||
return new Page<>(pageNo, pageSize);
|
||||
}
|
||||
queryWrapper.in("contact_id", userList.stream().map(SysUser::getId).collect(Collectors.toList()));
|
||||
}
|
||||
Page<LawsContactManage> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user