fix: 解决标签排序问题
This commit is contained in:
parent
b970633fd2
commit
9e12811bc5
@ -45,11 +45,11 @@ public class NotifyChannelServiceImpl implements INotifyService {
|
||||
userProfileMap.put("accountType", AccountTypeEnum.ROBOT.getCode());
|
||||
List<RobotTagResp> robotTags = robotInfoResp.getRobotTagList();
|
||||
if (CollectionUtils.isNotEmpty(robotTags)) {
|
||||
robotTags = robotTags.stream().sorted(Comparator.comparing(RobotTagResp::getWeight).reversed()
|
||||
.thenComparing(RobotTagResp::getId))
|
||||
.collect(Collectors.toList());
|
||||
robotTags = robotTags.stream().sorted(
|
||||
Comparator.comparing(RobotTagResp::getWeight, Comparator.reverseOrder())
|
||||
.thenComparing(RobotTagResp::getId, Comparator.reverseOrder()))
|
||||
.collect(Collectors.toList());
|
||||
robotTags.forEach(robotTagResp -> {
|
||||
robotTagResp.setId(null);
|
||||
robotTagResp.setUseCount(null);
|
||||
robotTagResp.setWeight(null);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user