党员活动接口
This commit is contained in:
@ -15,7 +15,7 @@ import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "党员活动接口")
|
||||
@RequestMapping("/api/eventpartybranch")
|
||||
@RequestMapping("/v1/eventpartybranch")
|
||||
public class PartyMemberEventController {
|
||||
|
||||
@Resource
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user