feat(corp): 添加企业列表排除自身功能

main
zhaokai 2026-03-02 15:29:02 +08:00
parent a6bbdb3398
commit f9ce6d28d0
3 changed files with 8 additions and 1 deletions

View File

@ -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);
} }

View File

@ -131,5 +131,8 @@ public class CorpInfoPageQry extends PageQuery {
private String menuPath; private String menuPath;
@ApiModelProperty(value = "排除自己的企业,1排除", name = "exCludeSelf")
private Integer exCludeSelf;
} }

View File

@ -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");