修复移动端消息中心图标不显示问题。
This commit is contained in:
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.anrui.portal.api.appsubsetversion.AppSubsetVersionFeign;
|
||||
import com.yxt.anrui.portal.api.appsubsetversion.AppSubsetVersionVo;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
@@ -45,6 +46,8 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
private MessageService messageService;
|
||||
@Autowired
|
||||
private AppSubsetVersionFeign appSubsetVersionFeign;
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
|
||||
public List<MessageList> listAll(MessageListQuery query) {
|
||||
QueryWrapper<MessageList> qw = createQueryWrapper(query);
|
||||
@@ -141,7 +144,7 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
return vo;
|
||||
}
|
||||
|
||||
public PagerVo<MessageListJoinMsgVo> noreadListPage(PagerQuery<MessageListQuery> pq,String userSid) {
|
||||
public PagerVo<MessageListJoinMsgVo> noreadListPage(PagerQuery<MessageListQuery> pq, String userSid) {
|
||||
MessageListQuery query = pq.getParams();
|
||||
query.setReceiverSid(userSid);
|
||||
QueryWrapper<MessageList> qw = createQueryWrapper(query);
|
||||
@@ -151,7 +154,7 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
return p;
|
||||
}
|
||||
|
||||
public PagerVo<MessageListJoinMsgVo> readListPage(PagerQuery<MessageListQuery> pq,String userSid) {
|
||||
public PagerVo<MessageListJoinMsgVo> readListPage(PagerQuery<MessageListQuery> pq, String userSid) {
|
||||
MessageListQuery query = pq.getParams();
|
||||
query.setReceiverSid(userSid);
|
||||
QueryWrapper<MessageList> qw = createQueryWrapper(query);
|
||||
@@ -238,6 +241,7 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
|
||||
/**
|
||||
* 查询未读数量
|
||||
*
|
||||
* @param msgTypeSid
|
||||
* @param userSid
|
||||
* @return
|
||||
@@ -248,6 +252,7 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
|
||||
/**
|
||||
* 手机端查询消息主页面
|
||||
*
|
||||
* @param userSid
|
||||
* @return
|
||||
*/
|
||||
@@ -267,13 +272,15 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
AppCrossIcon crossIcon = new AppCrossIcon();
|
||||
crossIcon.setMsgTypeSid(messageTypeVo.getMsgTypeSid());
|
||||
crossIcon.setMsgType(messageTypeVo.getMsgType());
|
||||
crossIcon.setIconUrl(messageTypeVo.getCrossIconUrl());
|
||||
crossIcon.setIconUrl(fileUploadComponent.getUrlPrefix() + messageTypeVo.getCrossIconUrl());
|
||||
crossIcon.setNum(num);
|
||||
crossIconList.add(crossIcon);
|
||||
} else { // 纵排消息
|
||||
AppLongsIcon longsIcon = new AppLongsIcon();
|
||||
longsIcon.setMsgType(messageTypeVo.getMsgType());
|
||||
longsIcon.setIconUrl(messageTypeVo.getLongIconUrl());
|
||||
if (StringUtils.isNotBlank(messageTypeVo.getLongIconUrl())) {
|
||||
longsIcon.setIconUrl(fileUploadComponent.getUrlPrefix() + messageTypeVo.getLongIconUrl());
|
||||
}
|
||||
AppLastMsgVo lastMsg = baseMapper.selectLastMsg(userSid, messageTypeVo.getMsgTypeSid());
|
||||
longsIcon.setMsgTypeSid(messageTypeVo.getMsgTypeSid());
|
||||
longsIcon.setTitle(lastMsg == null ? "" : lastMsg.getMsgTitle());
|
||||
@@ -287,13 +294,14 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
vo.setLongIconList(longIconList);
|
||||
int unReadCount = baseMapper.selectUnReadCount("", userSid);
|
||||
if (unReadCount != 0) {
|
||||
vo.setMsgTotal("未读消息"+unReadCount+"条");
|
||||
vo.setMsgTotal("未读消息" + unReadCount + "条");
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机端查询消息列表
|
||||
*
|
||||
* @param pq
|
||||
* @return
|
||||
*/
|
||||
@@ -317,12 +325,13 @@ public class MessageListService extends MybatisBaseService<MessageListMapper, Me
|
||||
vo.setJson("{}");
|
||||
}
|
||||
});
|
||||
pagerVo.setMsg("共查询出"+pagerVo.getTotal()+"条消息");
|
||||
pagerVo.setMsg("共查询出" + pagerVo.getTotal() + "条消息");
|
||||
return pagerVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机端用户根据消息类型批量设为已读
|
||||
*
|
||||
* @param msgTypeSid
|
||||
* @return
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user