|
@@ -43,20 +43,18 @@ public class HotIconServiceImpl extends ServiceImpl<IHotIconMapper, HotIcon> imp
|
|
|
.orderByDesc(HotIcon::getIsNew) // 新增
|
|
|
.orderByDesc(HotIcon::getLastUse) // 上次使用
|
|
|
.orderByDesc(HotIcon::getUseNum) // 使用次数
|
|
|
+ .orderByDesc(HotIcon::getSort)
|
|
|
.orderByDesc(HotIcon::getCreateTime);
|
|
|
return this.list(wrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HotIcon getDefaultIcon() {
|
|
|
+ public List<HotIcon> getDefaultIcon() {
|
|
|
LambdaQueryWrapper<HotIcon> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(HotIcon::getIsSystem,1);
|
|
|
wrapper.orderByDesc(HotIcon::getCreateTime);
|
|
|
List<HotIcon> list = this.list(wrapper);
|
|
|
- if(list!= null && list.size() >0){
|
|
|
- return list.get(0);
|
|
|
- }
|
|
|
- return null;
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -96,7 +94,7 @@ public class HotIconServiceImpl extends ServiceImpl<IHotIconMapper, HotIcon> imp
|
|
|
hotIconIds.addAll(ids);
|
|
|
}
|
|
|
}
|
|
|
- hotIconIds.add(getDefaultIcon().getIconId());
|
|
|
+ hotIconIds.addAll(getDefaultIcon().stream().map(HotIcon::getIconId).collect(Collectors.toList()));
|
|
|
LambdaQueryWrapper<HotIcon> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(HotIcon::getCaseId,caseId);
|
|
|
List<HotIcon> list1 = this.list(wrapper);
|
|
@@ -115,10 +113,8 @@ public class HotIconServiceImpl extends ServiceImpl<IHotIconMapper, HotIcon> imp
|
|
|
LambdaQueryWrapper<HotIcon> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.in(HotIcon::getIconId,hotIconIds);
|
|
|
wrapper.orderByDesc(HotIcon::getIsSystem) // 官方默认
|
|
|
- .orderByDesc(HotIcon::getIsNew) // 新增
|
|
|
- .orderByDesc(HotIcon::getLastUse) // 上次使用
|
|
|
- .orderByDesc(HotIcon::getUseNum) // 使用次数
|
|
|
- .orderByDesc(HotIcon::getCreateTime);
|
|
|
+ .orderByAsc(HotIcon::getIconTitle)
|
|
|
+ .orderByAsc(HotIcon::getSort);
|
|
|
return this.list(wrapper);
|
|
|
}
|
|
|
}
|