//取各个批次中奖人列表
public Map<String,List<AniuAnnualMeetingRecord>> getAwardBatchList(){
List<AniuAnnualMeetingRecord> list = aniuAnnualMeetingRecordMapper.getAwardBatchList();
if(list == null || list.isEmpty()){
return null;
}
TreeMap tm = new TreeMap();
for(int i = 0; i < list.size(); i++){
AniuAnnualMeetingRecord s = list.get(i);
if(tm.containsKey(s.getBatchId())){
ArrayList alist = (ArrayList)tm.get(s.getBatchId());
alist.add(s);
}else{
ArrayList tem = new ArrayList();
tem.add(s);
tm.put(s.getBatchId(), tem);
}
}
return tm;
}
List结果按照某个对象属性分类
最新推荐文章于 2023-08-03 16:00:02 发布
本文介绍了一种从数据库获取并组织多个批次中奖人员列表的方法,使用TreeMap按批次ID整理列表,确保数据的有序性和高效检索。
2003

被折叠的 条评论
为什么被折叠?



