Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
4129505b
Commit
4129505b
authored
May 25, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询某个会话历史消息分页列表;
parent
615f7b7a
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
130 additions
and
24 deletions
+130
-24
common/src/main/java/com/wecloud/im/controller/ImConversationController.java
+1
-4
common/src/main/java/com/wecloud/im/controller/ImMessageController.java
+18
-0
common/src/main/java/com/wecloud/im/mapper/ImMessageMapper.java
+9
-0
common/src/main/java/com/wecloud/im/param/ImHistoryMessagePageParam.java
+27
-0
common/src/main/java/com/wecloud/im/param/ImMessagePageParam.java
+2
-2
common/src/main/java/com/wecloud/im/service/ImMessageService.java
+10
-0
common/src/main/java/com/wecloud/im/service/impl/ImClientLoginServiceImpl.java
+5
-7
common/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+3
-0
common/src/main/java/com/wecloud/im/service/impl/ImMessageServiceImpl.java
+11
-0
common/src/main/java/com/wecloud/im/tillo/app_ws/WsHandler.java
+1
-1
common/src/main/java/com/wecloud/im/tillo/app_ws/model/request/ReceiveModel.java
+2
-1
common/src/main/java/com/wecloud/im/tillo/app_ws/receive/ReadWsData.java
+8
-7
common/src/main/resources/mapper/ImMessageMapper.xml
+33
-2
No files found.
common/src/main/java/com/wecloud/im/controller/ImConversationController.java
View file @
4129505b
...
@@ -6,8 +6,6 @@ import com.wecloud.im.service.ImConversationService;
...
@@ -6,8 +6,6 @@ import com.wecloud.im.service.ImConversationService;
import
com.wecloud.im.vo.MyConversationListVo
;
import
com.wecloud.im.vo.MyConversationListVo
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -38,8 +36,7 @@ public class ImConversationController extends BaseController {
...
@@ -38,8 +36,7 @@ public class ImConversationController extends BaseController {
* 创建会话
* 创建会话
*/
*/
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@OperationLog
(
name
=
"创建会话"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"创建会话"
,
notes
=
"两个用户如果已经创建过会话,不能重复创建会话"
)
@ApiOperation
(
value
=
"创建会话"
)
public
ApiResult
<
ImConversation
>
createImConversation
(
@RequestBody
ImConversationCreate
imConversationCreate
)
throws
Exception
{
public
ApiResult
<
ImConversation
>
createImConversation
(
@RequestBody
ImConversationCreate
imConversationCreate
)
throws
Exception
{
ApiResult
<
ImConversation
>
imConversation
=
imConversationService
.
createImConversation
(
imConversationCreate
);
ApiResult
<
ImConversation
>
imConversation
=
imConversationService
.
createImConversation
(
imConversationCreate
);
return
imConversation
;
return
imConversation
;
...
...
common/src/main/java/com/wecloud/im/controller/ImMessageController.java
View file @
4129505b
package
com
.
wecloud
.
im
.
controller
;
package
com
.
wecloud
.
im
.
controller
;
import
com.wecloud.im.param.ImHistoryMessagePageParam
;
import
com.wecloud.im.service.ImMessageService
;
import
com.wecloud.im.service.ImMessageService
;
import
com.wecloud.im.vo.ImMessageOfflineListVo
;
import
com.wecloud.im.vo.ImMessageOfflineListVo
;
import
com.wecloud.im.vo.OfflineMsgDto
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -41,6 +48,17 @@ public class ImMessageController extends BaseController {
...
@@ -41,6 +48,17 @@ public class ImMessageController extends BaseController {
}
}
/**
* 查询某个会话历史消息分页列表
*/
@PostMapping
(
"/getHistoryMsg"
)
@OperationLog
(
name
=
"查询某个会话历史消息分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"查询某个会话历史消息分页列表"
)
public
ApiResult
<
Paging
<
OfflineMsgDto
>>
getHistoryMsg
(
@Validated
@RequestBody
ImHistoryMessagePageParam
imHistoryMessagePageParam
)
throws
Exception
{
Paging
<
OfflineMsgDto
>
paging
=
imMessageService
.
getHistoryMsgConversationId
(
imHistoryMessagePageParam
);
return
ApiResult
.
ok
(
paging
);
}
//
//
// /**
// /**
// * 添加消息存储表
// * 添加消息存储表
...
...
common/src/main/java/com/wecloud/im/mapper/ImMessageMapper.java
View file @
4129505b
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.param.ImHistoryMessagePageParam
;
import
com.wecloud.im.param.ImMessagePageParam
;
import
com.wecloud.im.param.ImMessagePageParam
;
import
com.wecloud.im.param.ImMessageQueryVo
;
import
com.wecloud.im.param.ImMessageQueryVo
;
import
com.wecloud.im.vo.OfflineMsgDto
;
import
com.wecloud.im.vo.OfflineMsgDto
;
...
@@ -39,6 +40,14 @@ public interface ImMessageMapper extends BaseMapper<ImMessage> {
...
@@ -39,6 +40,14 @@ public interface ImMessageMapper extends BaseMapper<ImMessage> {
*/
*/
IPage
<
ImMessageQueryVo
>
getImMessagePageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
ImMessagePageParam
imMessagePageParam
);
IPage
<
ImMessageQueryVo
>
getImMessagePageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
ImMessagePageParam
imMessagePageParam
);
/**
* 查询某个会话历史消息分页列表
*
* @param page
* @param imHistoryMessagePageParam
* @return
*/
IPage
<
OfflineMsgDto
>
getHistoryMsgConversationId
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
ImHistoryMessagePageParam
imHistoryMessagePageParam
);
/**
/**
* 根据客户端id与会话id 查询离线消息
* 根据客户端id与会话id 查询离线消息
...
...
common/src/main/java/com/wecloud/im/param/ImHistoryMessagePageParam.java
0 → 100644
View file @
4129505b
package
com
.
wecloud
.
im
.
param
;
import
io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <pre>
* 消息存储表 分页参数对象
* </pre>
*
* @author wei
* @date 2021-04-29
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"ImHistoryMessagePageParam"
)
public
class
ImHistoryMessagePageParam
extends
BasePageOrderParam
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"会话id"
)
private
Long
conversationId
;
}
common/src/main/java/com/wecloud/im/param/ImMessagePageParam.java
View file @
4129505b
package
com
.
wecloud
.
im
.
param
;
package
com
.
wecloud
.
im
.
param
;
import
io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam
;
/**
/**
* <pre>
* <pre>
...
@@ -20,4 +20,4 @@ import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
...
@@ -20,4 +20,4 @@ import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
@ApiModel
(
value
=
"消息存储表分页参数"
)
@ApiModel
(
value
=
"消息存储表分页参数"
)
public
class
ImMessagePageParam
extends
BasePageOrderParam
{
public
class
ImMessagePageParam
extends
BasePageOrderParam
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
common/src/main/java/com/wecloud/im/service/ImMessageService.java
View file @
4129505b
package
com
.
wecloud
.
im
.
service
;
package
com
.
wecloud
.
im
.
service
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.param.ImHistoryMessagePageParam
;
import
com.wecloud.im.param.ImMessagePageParam
;
import
com.wecloud.im.param.ImMessagePageParam
;
import
com.wecloud.im.param.ImMessageQueryVo
;
import
com.wecloud.im.param.ImMessageQueryVo
;
import
com.wecloud.im.vo.ImMessageOfflineListVo
;
import
com.wecloud.im.vo.ImMessageOfflineListVo
;
...
@@ -63,6 +64,15 @@ public interface ImMessageService extends BaseService<ImMessage> {
...
@@ -63,6 +64,15 @@ public interface ImMessageService extends BaseService<ImMessage> {
*/
*/
Paging
<
ImMessageQueryVo
>
getImMessagePageList
(
ImMessagePageParam
imMessagePageParam
)
throws
Exception
;
Paging
<
ImMessageQueryVo
>
getImMessagePageList
(
ImMessagePageParam
imMessagePageParam
)
throws
Exception
;
/**
* 查询某个会话历史消息分页列表
*
* @param imHistoryMessagePageParam
* @return
* @throws Exception
*/
Paging
<
OfflineMsgDto
>
getHistoryMsgConversationId
(
ImHistoryMessagePageParam
imHistoryMessagePageParam
)
throws
Exception
;
/**
/**
* 查询用户所有离线消息
* 查询用户所有离线消息
...
...
common/src/main/java/com/wecloud/im/service/impl/ImClientLoginServiceImpl.java
View file @
4129505b
...
@@ -9,7 +9,6 @@ import com.wecloud.im.param.ImTokenVerify;
...
@@ -9,7 +9,6 @@ import com.wecloud.im.param.ImTokenVerify;
import
com.wecloud.im.service.ImApplicationService
;
import
com.wecloud.im.service.ImApplicationService
;
import
com.wecloud.im.service.ImClientLoginService
;
import
com.wecloud.im.service.ImClientLoginService
;
import
com.wecloud.im.service.ImClientService
;
import
com.wecloud.im.service.ImClientService
;
import
com.wecloud.im.tillo.app_ws.utils.RedisUtils
;
import
com.wecloud.im.vo.TokenVo
;
import
com.wecloud.im.vo.TokenVo
;
import
io.geekidea.springbootplus.config.properties.JwtProperties
;
import
io.geekidea.springbootplus.config.properties.JwtProperties
;
import
io.geekidea.springbootplus.framework.common.api.ApiCode
;
import
io.geekidea.springbootplus.framework.common.api.ApiCode
;
...
@@ -19,18 +18,17 @@ import io.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
...
@@ -19,18 +18,17 @@ import io.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
import
io.geekidea.springbootplus.framework.shiro.util.JwtUtil
;
import
io.geekidea.springbootplus.framework.shiro.util.JwtUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
@Service
@Service
@Slf4j
@Slf4j
public
class
ImClientLoginServiceImpl
implements
ImClientLoginService
{
public
class
ImClientLoginServiceImpl
implements
ImClientLoginService
{
@Autowired
//
@Autowired
private
RedisUtils
redisUtils
;
//
private RedisUtils redisUtils;
@Autowired
//
@Autowired
private
StringRedisTemplate
redisTemplate
;
//
private StringRedisTemplate redisTemplate;
@Autowired
@Autowired
private
ImApplicationService
imApplicationService
;
private
ImApplicationService
imApplicationService
;
...
@@ -62,7 +60,7 @@ public class ImClientLoginServiceImpl implements ImClientLoginService {
...
@@ -62,7 +60,7 @@ public class ImClientLoginServiceImpl implements ImClientLoginService {
);
);
if
(
imApplication
==
null
)
{
if
(
imApplication
==
null
)
{
log
.
debug
(
"imApplication == null"
);
log
.
error
(
"imApplication == null,getAppKey:"
+
imTokenVerify
.
getAppKey
()
);
return
ApiResult
.
result
(
ApiCode
.
FAIL
,
null
);
return
ApiResult
.
result
(
ApiCode
.
FAIL
,
null
);
}
}
...
...
common/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
4129505b
...
@@ -68,6 +68,9 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -68,6 +68,9 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
// 判断是否已经存在会话
// 会话id
Long
imConversationId
=
SnowflakeUtil
.
getId
();
Long
imConversationId
=
SnowflakeUtil
.
getId
();
// 根据appKey查询appid
// 根据appKey查询appid
...
...
common/src/main/java/com/wecloud/im/service/impl/ImMessageServiceImpl.java
View file @
4129505b
...
@@ -7,6 +7,7 @@ import com.wecloud.im.entity.ImClient;
...
@@ -7,6 +7,7 @@ import com.wecloud.im.entity.ImClient;
import
com.wecloud.im.entity.ImConversation
;
import
com.wecloud.im.entity.ImConversation
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.entity.ImMessage
;
import
com.wecloud.im.mapper.ImMessageMapper
;
import
com.wecloud.im.mapper.ImMessageMapper
;
import
com.wecloud.im.param.ImHistoryMessagePageParam
;
import
com.wecloud.im.param.ImMessagePageParam
;
import
com.wecloud.im.param.ImMessagePageParam
;
import
com.wecloud.im.param.ImMessageQueryVo
;
import
com.wecloud.im.param.ImMessageQueryVo
;
import
com.wecloud.im.service.ImClientService
;
import
com.wecloud.im.service.ImClientService
;
...
@@ -74,6 +75,16 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
...
@@ -74,6 +75,16 @@ public class ImMessageServiceImpl extends BaseServiceImpl<ImMessageMapper, ImMes
return
new
Paging
<
ImMessageQueryVo
>(
iPage
);
return
new
Paging
<
ImMessageQueryVo
>(
iPage
);
}
}
@Override
public
Paging
<
OfflineMsgDto
>
getHistoryMsgConversationId
(
ImHistoryMessagePageParam
imHistoryMessagePageParam
)
throws
Exception
{
Page
<
ImMessage
>
page
=
new
PageInfo
<>(
imHistoryMessagePageParam
,
OrderItem
.
desc
(
getLambdaColumn
(
ImMessage:
:
getCreateTime
)));
IPage
<
OfflineMsgDto
>
iPage
=
imMessageMapper
.
getHistoryMsgConversationId
(
page
,
imHistoryMessagePageParam
);
return
new
Paging
<>(
iPage
);
}
/**
/**
* 查询用户所有离线消息
* 查询用户所有离线消息
*
*
...
...
common/src/main/java/com/wecloud/im/tillo/app_ws/WsHandler.java
View file @
4129505b
...
@@ -71,7 +71,7 @@ public class WsHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> {
...
@@ -71,7 +71,7 @@ public class WsHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> {
// Long userIdByChannel = appUserChannelsService.getUserIdByChannel(ctx);
// Long userIdByChannel = appUserChannelsService.getUserIdByChannel(ctx);
//
//
// log.debug("appWS收到" + userIdByChannel + ":" + data + ",channelId:" + ctx.channel().id().asLongText());
// log.debug("appWS收到" + userIdByChannel + ":" + data + ",channelId:" + ctx.channel().id().asLongText());
log
.
debug
(
"WS收到"
+
data
);
log
.
debug
(
"WS收到
:
"
+
data
);
readWsData
.
convertModel
(
data
,
ctx
);
readWsData
.
convertModel
(
data
,
ctx
);
}
}
...
...
common/src/main/java/com/wecloud/im/tillo/app_ws/model/request/ReceiveModel.java
View file @
4129505b
...
@@ -15,7 +15,8 @@ import java.util.HashMap;
...
@@ -15,7 +15,8 @@ import java.util.HashMap;
@Data
@Data
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
public
class
ReceiveModel
implements
Serializable
{
public
class
ReceiveModel
implements
Serializable
{
/**
/**
* 枚举类UriPathEnum 请求uri的编码
* 枚举类UriPathEnum 请求uri的编码
...
...
common/src/main/java/com/wecloud/im/tillo/app_ws/receive/ReadWsData.java
View file @
4129505b
...
@@ -32,7 +32,7 @@ public class ReadWsData {
...
@@ -32,7 +32,7 @@ public class ReadWsData {
@Resource
@Resource
private
WriteDataService
writeDataService
;
private
WriteDataService
writeDataService
;
private
static
final
String
PING
=
"p"
;
private
static
final
String
PING
=
"p
ing
"
;
/**
/**
* 在此开始进入业务流程子线程,将不占netty的io线程
* 在此开始进入业务流程子线程,将不占netty的io线程
...
@@ -41,15 +41,16 @@ public class ReadWsData {
...
@@ -41,15 +41,16 @@ public class ReadWsData {
* @throws Exception
* @throws Exception
*/
*/
public
void
convertModel
(
String
data
,
ChannelHandlerContext
ctx
)
{
public
void
convertModel
(
String
data
,
ChannelHandlerContext
ctx
)
{
String
appKey
=
ctx
.
channel
().
attr
(
MangerChannelService
.
APP_KEY
).
get
();
String
clientId
=
ctx
.
channel
().
attr
(
MangerChannelService
.
CLIENT_ID
).
get
();
//
if (PING.equals(data)) {
if
(
PING
.
equals
(
data
))
{
// log.debug("收到心跳:" + user
Id);
log
.
debug
(
"收到心跳:"
+
client
Id
);
//
return;
return
;
//
}
}
String
language
=
ctx
.
channel
().
attr
(
MangerChannelService
.
LANGUAGE
).
get
();
String
language
=
ctx
.
channel
().
attr
(
MangerChannelService
.
LANGUAGE
).
get
();
String
appKey
=
ctx
.
channel
().
attr
(
MangerChannelService
.
APP_KEY
).
get
();
String
clientId
=
ctx
.
channel
().
attr
(
MangerChannelService
.
CLIENT_ID
).
get
();
// ReceiveModel requestModel = JSON.parseObject(data, ReceiveModel.class);
// ReceiveModel requestModel = JSON.parseObject(data, ReceiveModel.class);
...
...
common/src/main/resources/mapper/ImMessageMapper.xml
View file @
4129505b
...
@@ -22,13 +22,44 @@
...
@@ -22,13 +22,44 @@
</select>
</select>
<select
id=
"getOfflineListByClientAndConversation"
resultType=
"com.wecloud.im.vo.OfflineMsgDto"
>
<select
id=
"getOfflineListByClientAndConversation"
resultType=
"com.wecloud.im.vo.OfflineMsgDto"
>
SELECT im_message.*
SELECT im_message.id AS id,
im_message.create_time,
im_message.withdraw_time,
im_message.update_date,
`im_client`.client_id AS sender,
im_message.content,
im_message.withdraw,
im_message.`event`,
im_message.system,
im_message.`at`,
im_message.send_status,
im_message.fk_conversation_id
FROM im_inbox
FROM im_inbox
INNER JOIN im_message im_message ON im_message.id = im_inbox.fk_msg_id
INNER JOIN im_message im_message ON im_message.id = im_inbox.fk_msg_id
INNER JOIN `im_client` ON `im_client`.id = `im_message`.sender
WHERE im_inbox.fk_conversation_id = #{conversationId}
WHERE im_inbox.fk_conversation_id = #{conversationId}
AND im_inbox.receiver = #{clientId}
AND im_inbox.receiver = #{clientId}
AND im_inbox.read_msg = 0
AND im_inbox.read_msg = 0
</select>
<select
id=
"getHistoryMsgConversationId"
resultType=
"com.wecloud.im.vo.OfflineMsgDto"
>
SELECT im_message.id AS id,
im_message.create_time,
im_message.withdraw_time,
im_message.update_date,
`im_client`.client_id AS sender,
im_message.content,
im_message.withdraw,
im_message.`event`,
im_message.system,
im_message.`at`,
im_message.send_status,
im_message.fk_conversation_id
FROM `im_message`
INNER JOIN `im_client` ON `im_client`.id = `im_message`.sender
WHERE fk_conversation_id = #{param.conversationId}
ORDER BY `im_message`.`create_time` DESC
</select>
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment