|
|
@@ -20,6 +20,7 @@ import shop.alien.store.service.LifeMessageService;
|
|
|
import shop.alien.store.service.LifeUserService;
|
|
|
import shop.alien.util.common.JwtUtil;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Comparator;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
@@ -81,6 +82,7 @@ public class LifeMessageServiceImpl extends ServiceImpl<LifeMessageMapper, LifeM
|
|
|
}
|
|
|
wrapper.orderByDesc("message.created_time");
|
|
|
List<LifeMessageVo> lifeMessagePageList = lifeMessageMapper.getLifeMessagePageByPhoneId(receiverId, wrapper);
|
|
|
+ List<LifeMessageVo> lifeMessagePageResultList = new ArrayList<>();
|
|
|
if (!CollectionUtils.isEmpty(lifeMessagePageList)) {
|
|
|
// 当前用户的所有关注
|
|
|
LambdaQueryWrapper<LifeFans> followWrapper = new LambdaQueryWrapper<>();
|
|
|
@@ -141,10 +143,16 @@ public class LifeMessageServiceImpl extends ServiceImpl<LifeMessageMapper, LifeM
|
|
|
} else {
|
|
|
messageVo.setIsMerchant("0");
|
|
|
}
|
|
|
+
|
|
|
+ String senderId = messageVo.getPhoneId();
|
|
|
+ if (senderId != null && senderId.startsWith("lawyer_")) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ lifeMessagePageResultList.add(messageVo);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return lifeMessagePageList;
|
|
|
+ return lifeMessagePageResultList;
|
|
|
} catch (Exception e) {
|
|
|
log.error("LifeMessageServiceImpl.getMessageList Error Mgs={}", e.getMessage());
|
|
|
throw new Exception(e);
|
|
|
@@ -234,14 +242,11 @@ public class LifeMessageServiceImpl extends ServiceImpl<LifeMessageMapper, LifeM
|
|
|
|
|
|
lifeMessageVoList.sort(Comparator.comparing(LifeMessageVo::getCreatedTime).reversed());
|
|
|
for(LifeMessageVo messageVo : lifeMessageVoList) {
|
|
|
- int messageId = messageVo.getId();
|
|
|
- LifeMessage lifeMessage = lifeMessageMapper.selectById(messageId);
|
|
|
- if(lifeMessage!=null){
|
|
|
- String senderId = lifeMessage.getSenderId();
|
|
|
+ String senderId = messageVo.getPhoneId();
|
|
|
if (senderId != null && senderId.startsWith("lawyer_")) {
|
|
|
continue;
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
messageVo.setNotReadCount(lifeMessageVoList.stream().filter(item -> 0 == item.getIsRead()).count());
|
|
|
// 根据手机号查询发送人信息
|
|
|
String storePhones = "''";
|