|
@@ -87,20 +87,24 @@ public class HotIconServiceImpl extends ServiceImpl<IHotIconMapper, HotIcon> imp
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<HotIcon> getListByCaseId(Integer caseId) {
|
|
public List<HotIcon> getListByCaseId(Integer caseId) {
|
|
|
|
+ List<Integer> hotIconId = new ArrayList<>();
|
|
List<CaseTag> list = caseTagService.getListByCaseId(caseId);
|
|
List<CaseTag> list = caseTagService.getListByCaseId(caseId);
|
|
if(list.size() >0){
|
|
if(list.size() >0){
|
|
- List<Integer> hotIconId = list.parallelStream().map(CaseTag::getHotIconId).collect(Collectors.toList());
|
|
|
|
- if(hotIconId.size() >0){
|
|
|
|
- return this.getByIds(hotIconId);
|
|
|
|
- }
|
|
|
|
|
|
+ hotIconId = list.parallelStream().map(CaseTag::getHotIconId).collect(Collectors.toList());
|
|
}
|
|
}
|
|
- return new ArrayList<>();
|
|
|
|
|
|
+ hotIconId.add(getDefaultIcon().getIconId());
|
|
|
|
+ return this.getByIds(hotIconId);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<HotIcon> getByIds(List<Integer> hotIconId) {
|
|
public List<HotIcon> getByIds(List<Integer> hotIconId) {
|
|
LambdaQueryWrapper<HotIcon> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<HotIcon> wrapper = new LambdaQueryWrapper<>();
|
|
wrapper.in(HotIcon::getIconId,hotIconId);
|
|
wrapper.in(HotIcon::getIconId,hotIconId);
|
|
|
|
+ wrapper.orderByDesc(HotIcon::getIsSystem) // 官方默认
|
|
|
|
+ .orderByDesc(HotIcon::getIsNew) // 新增
|
|
|
|
+ .orderByDesc(HotIcon::getLastUse) // 上次使用
|
|
|
|
+ .orderByDesc(HotIcon::getUseNum) // 使用次数
|
|
|
|
+ .orderByDesc(HotIcon::getCreateTime);
|
|
return this.list(wrapper);
|
|
return this.list(wrapper);
|
|
}
|
|
}
|
|
}
|
|
}
|