Merge branch 'feature/REQ-2012-syl' into 'feature/REQ-2012'
Feature/req 2012 syl See merge request universal/infrastructure/backend/im-center!34
This commit is contained in:
commit
f11250e290
@ -72,7 +72,7 @@ public class PrivateMessageController {
|
||||
if (CollUtil.isEmpty(accounts)) {
|
||||
log.info("appKey= [{}], senderId= [{}] 用户没有注册im账号, 请检查",
|
||||
appKey, param.getSenderId());
|
||||
return CommonResponse.success(result);
|
||||
AssertUtil.notEmpty(accounts, "发送者未注册im账号, 请检查");
|
||||
}
|
||||
AccountRegister account = accounts.get(0);
|
||||
if (param.getSenderType() == AccountTypeEnum.USER) {
|
||||
|
||||
@ -8,14 +8,15 @@ import cn.axzo.im.channel.netease.INotifyService;
|
||||
import cn.axzo.im.channel.netease.dto.RegisterUpdateRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.google.common.collect.Maps;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通知到IM系统
|
||||
*
|
||||
@ -44,8 +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, 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