Commit bedbd307 authored by zhangc's avatar zhangc

commit

parent 4c6d5886
...@@ -20,7 +20,13 @@ import java.io.Serializable; ...@@ -20,7 +20,13 @@ import java.io.Serializable;
@ApiModel("组织管理查询请求体") @ApiModel("组织管理查询请求体")
public class OrganizationManageListQueryReq extends BasePageBean implements Serializable { public class OrganizationManageListQueryReq extends BasePageBean implements Serializable {
@ApiModelProperty(value = "组织名称/组织联系") @ApiModelProperty(value = "组织名称")
private String key; private String orgName;
@ApiModelProperty(value = "组织编码(组织唯一标识)")
private String orgCode;
@ApiModelProperty(value = "组织联系人")
private String linkman;
} }
...@@ -51,10 +51,15 @@ public class OrganizationManageImpl implements OrganizationManageService { ...@@ -51,10 +51,15 @@ public class OrganizationManageImpl implements OrganizationManageService {
public IPage<ApiOrg> listOrganization(OrganizationManageListQueryReq req) { public IPage<ApiOrg> listOrganization(OrganizationManageListQueryReq req) {
IPage<ApiOrg> page = new Page<>(req.getPageNum(), req.getPageSize()); IPage<ApiOrg> page = new Page<>(req.getPageNum(), req.getPageSize());
QueryWrapper<ApiOrg> query = new QueryWrapper<>(); QueryWrapper<ApiOrg> query = new QueryWrapper<>();
if (StringUtils.isNotBlank(req.getKey())){
query.and(wrapper -> wrapper.like("org_name",req.getKey()) if (StringUtils.isNotBlank(req.getOrgName())){
.or().like("org_code",req.getKey()) query.like("org_name",req.getOrgName());
.or().like("linkman",req.getKey())); }
if (StringUtils.isNotBlank(req.getLinkman())){
query.like("linkman",req.getLinkman());
}
if (StringUtils.isNotBlank(req.getOrgCode())){
query.eq("org_code",req.getOrgCode());
} }
query.eq("is_deleted", 0); query.eq("is_deleted", 0);
query.orderByDesc("create_date"); query.orderByDesc("create_date");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment