feat(corp): 添加企业列表排除自身功能
parent
a6bbdb3398
commit
f9ce6d28d0
|
|
@ -51,7 +51,6 @@ public class CorpInfoController {
|
||||||
|
|
||||||
@ApiOperation("分页")
|
@ApiOperation("分页")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
|
|
||||||
public PageResponse<CorpInfoCO> page(@Validated @RequestBody CorpInfoPageQry qry) {
|
public PageResponse<CorpInfoCO> page(@Validated @RequestBody CorpInfoPageQry qry) {
|
||||||
return corpInfoService.listPage(qry);
|
return corpInfoService.listPage(qry);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,5 +131,8 @@ public class CorpInfoPageQry extends PageQuery {
|
||||||
|
|
||||||
private String menuPath;
|
private String menuPath;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排除自己的企业,1:排除", name = "exCludeSelf")
|
||||||
|
private Integer exCludeSelf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,11 @@ public class CorpInfoRepositoryImpl extends BaseRepositoryImpl<CorpInfoMapper, C
|
||||||
if (CollUtil.isNotEmpty(enterpriseType)) {
|
if (CollUtil.isNotEmpty(enterpriseType)) {
|
||||||
queryWrapper.in("type", enterpriseType);
|
queryWrapper.in("type", enterpriseType);
|
||||||
}
|
}
|
||||||
|
//排除自己的企业,1:排除
|
||||||
|
if(params.get("excludeSelf") != null && (Integer) params.get("excludeSelf") == 1){
|
||||||
|
queryWrapper.ne("id", AuthContext.getTenantId());
|
||||||
|
}
|
||||||
|
|
||||||
if (params.get("enterpriseTypeList") != null
|
if (params.get("enterpriseTypeList") != null
|
||||||
&& params.get("enterpriseTypeList") instanceof List){
|
&& params.get("enterpriseTypeList") instanceof List){
|
||||||
List<Integer> enterpriseTypeList = (List<Integer>) params.get("enterpriseTypeList");
|
List<Integer> enterpriseTypeList = (List<Integer>) params.get("enterpriseTypeList");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue