党员活动 查询参数

This commit is contained in:
517612449@qq.com
2022-06-28 13:38:25 +08:00
parent 50a969ee47
commit b21af4db15
2 changed files with 7 additions and 5 deletions

View File

@ -103,7 +103,7 @@ public class PartyMemberEventController {
@ApiOperation("党员列表模糊查询") @ApiOperation("党员列表模糊查询")
@GetMapping("/partyMember/paramQuery") @GetMapping("/partyMember/paramQuery")
public BaseResponse<List<EventPartyBranch>> getPartyMemberListByParam(@RequestParam(value = "belongBranch", required = false) String belongBranch, @RequestParam(value = "param") String param) { public BaseResponse<List<EventPartyBranch>> getPartyMemberListByParam(@RequestParam(value = "belongBranch", required = false) String belongBranch, @RequestParam(value = "param", required = false) String param) {
return BaseResponse.success(eventPartyBranchService.getPartyMemberListByParam(belongBranch, param)); return BaseResponse.success(eventPartyBranchService.getPartyMemberListByParam(belongBranch, param));
} }
} }

View File

@ -96,12 +96,14 @@ public class EventPartyBranchServiceImpl extends ServiceImpl<EventPartyBranchMap
if (StrUtil.isNotBlank(belongBranch)) { if (StrUtil.isNotBlank(belongBranch)) {
queryMember.eq(EventPartyBranch::getBelongBranch, belongBranch); queryMember.eq(EventPartyBranch::getBelongBranch, belongBranch);
} }
if (StrUtil.isNotBlank(param)) {
queryMember.and(w -> w.like(EventPartyBranch::getContactName, param)
.or().like(EventPartyBranch::getContactMobiphone, param)
.or().like(EventPartyBranch::getContactEmail, param));
}
queryMember.eq(EventPartyBranch::getType, "2") queryMember.eq(EventPartyBranch::getType, "2")
.eq(EventPartyBranch::getStatus, "1") .eq(EventPartyBranch::getStatus, "1");
.and(w -> w.like(EventPartyBranch::getContactName, param)
.or().like(EventPartyBranch::getContactMobiphone, param)
.or().like(EventPartyBranch::getContactEmail, param));
return this.list(queryMember); return this.list(queryMember);
} }