党员活动接口

This commit is contained in:
517612449@qq.com
2022-06-23 15:06:17 +08:00
parent 4bc7401094
commit 8e65a99d4b
2 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ import java.util.Map;
@RestController
@Api(tags = "党员活动接口")
@RequestMapping("/api/eventpartybranch")
@RequestMapping("/v1/eventpartybranch")
public class PartyMemberEventController {
@Resource

View File

@ -25,7 +25,7 @@ public class EventPartyBranchServiceImpl extends ServiceImpl<EventPartyBranchMap
public List<String> getEventDeclarationList() {
LambdaQueryWrapper<EventPartyBranch> query = Wrappers.lambdaQuery();
query.eq(EventPartyBranch::getType, "2").eq(EventPartyBranch::getStatus, "1").isNotNull(EventPartyBranch::getEventDeclaration);
List<EventPartyBranch> list = this.list();
List<EventPartyBranch> list = this.list(query);
if (list.isEmpty()) {
return new ArrayList<>();
}
@ -62,7 +62,7 @@ public class EventPartyBranchServiceImpl extends ServiceImpl<EventPartyBranchMap
List<EventPartyBranch> memberList = this.list(queryMember);
Map<String, List<EventPartyBranch>> listMap = memberList.stream().collect(Collectors.groupingBy(EventPartyBranch::getBelongBranch));
list.forEach(f -> f.setCount(listMap.get(f.getBelongBranch()).size()));
list.forEach(f -> f.setCount(listMap.get(f.getId()) == null ? 0 : listMap.get(f.getId()).size()));
return list.stream().sorted(Comparator.comparing(EventPartyBranch::getCount).reversed()).collect(Collectors.toList());
}
@ -80,9 +80,9 @@ public class EventPartyBranchServiceImpl extends ServiceImpl<EventPartyBranchMap
queryMember.eq(EventPartyBranch::getType, "2")
.eq(EventPartyBranch::getStatus, "1")
.eq(EventPartyBranch::getBelongBranch, belongBranch)
.like(EventPartyBranch::getContactName,param)
.like(EventPartyBranch::getContactMobiphone,param)
.like(EventPartyBranch::getContactEmail,param);
.and(w -> w.like(EventPartyBranch::getContactName, param)
.or().like(EventPartyBranch::getContactMobiphone, param)
.or().like(EventPartyBranch::getContactEmail, param));
return this.list(queryMember);
}