党员活动 排序
This commit is contained in:
@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventContactMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContact;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventPartyBranch;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventContactService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -26,7 +28,7 @@ public class EventContactServiceImpl extends ServiceImpl<EventContactMapper, Eve
|
||||
public Map<String, List<EventContact>> getEventContactGroup() {
|
||||
LambdaQueryWrapper<EventContact> query = Wrappers.lambdaQuery();
|
||||
query.eq(EventContact::getStatus, "1");
|
||||
return this.list(query).stream().collect(Collectors.groupingBy(EventContact::getContactUnit));
|
||||
return this.list(query).stream().sorted(Comparator.comparing(EventContact::getSort)).collect(Collectors.groupingBy(EventContact::getContactUnit));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,7 +66,7 @@ public class EventPartyBranchServiceImpl extends ServiceImpl<EventPartyBranchMap
|
||||
|
||||
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());
|
||||
return list.stream().sorted(Comparator.comparing(EventPartyBranch::getSort)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user