Commit 9c398c8e by Future

群@功能

parent 82ed2099
......@@ -179,7 +179,7 @@ public class ImConversationController extends BaseController {
*/
@PostMapping("/getList")
@ApiOperation(value = "查询加入的会话列表", notes = "查询用户加入的非隐藏状态的会话列表 与每个会话的未读条数 成员")
public ApiResult<List<ConversationVo>> getMyImConversationListAndMsgCount() throws Exception {
public ApiResult<List<ConversationVo>> getMyImConversationListAndMsgCount() {
List<ConversationVo> conversationList = imConversationService.getMyImConversationListAndMsgCount();
return ApiResult.ok(conversationList);
}
......
......@@ -40,6 +40,11 @@ public class ChatContentVo extends BaseRequest {
*/
String text;
/**
* 被@人clientId, 多人用英文逗号分隔
*/
String at;
public PushVO getPush() {
return JsonUtils.beanCopyDeep(this.get("push"), PushVO.class);
}
......@@ -73,6 +78,14 @@ public class ChatContentVo extends BaseRequest {
this.text = text;
}
public String getAt() {
return at;
}
public void setAt(String at) {
this.at = at;
}
@Override
public String getReqId() {
return reqId;
......
......@@ -1108,7 +1108,6 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
// 查询会话的最后一条消息
OfflineMsgDto lastMsg = imMessageService.getLastMsgByConversationId(myconversationlistvo.getId());
myconversationlistvo.setLastMsg(lastMsg);
myImConversationListAndMsgCountNew.add(myconversationlistvo);
}
......
......@@ -195,6 +195,7 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
imMessage.setSystemFlag(false);
imMessage.setSendStatus(2);
imMessage.setMsgType(data.getType());
imMessage.setAt(data.getAt());
imMessage.setFkConversationId(data.getToConversation());
this.save(imMessage);
return imMessage;
......
......@@ -61,6 +61,9 @@ public class ConversationVo implements Serializable {
@ApiModelProperty("会话最后一条消息")
private OfflineMsgDto lastMsg;
@ApiModelProperty("是否被@ true-是 false-否")
private Boolean isBeAt;
/**
* 禁言开关
* @see com.wecloud.im.enums.MutedEnum
......@@ -68,4 +71,7 @@ public class ConversationVo implements Serializable {
@ApiModelProperty("禁言开关 1-未禁言 2-禁言")
private Integer muted;
@ApiModelProperty("禁言开关 1-未禁言 2-禁言")
private Integer beAtCount;
}
......@@ -36,6 +36,12 @@
WHERE im_inbox.fk_conversation_id = imConversation.id
AND im_inbox.receiver = #{currentClientId}
AND im_inbox.read_msg_status = 0) AS msg_not_read_count,
(SELECT COUNT(*)
FROM im_inbox INNER JOIN im_message ON im_inbox.fk_msg_id = im_message.id
WHERE im_inbox.fk_conversation_id = imConversation.id
AND im_inbox.receiver = #{currentClientId}
AND im_inbox.read_msg_status = 0
AND FIND_IN_SET(#{currentClientId},im_message.`at`) > 0) AS beAtCount,
(
SELECT GROUP_CONCAT(im_client.client_id)
FROM im_conversation_members AS im_conversation_members
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment