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
c236957f
Commit
c236957f
authored
Aug 19, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未读人数统计,全部人已读为0;
未接收人数统计,全部人已接收为0;
parent
bac597e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
common/src/main/java/com/wecloud/im/controller/ImClientController.java
+3
-2
common/src/main/java/com/wecloud/im/vo/OfflineMsgDto.java
+4
-1
common/src/main/resources/mapper/ImMessageMapper.xml
+11
-2
No files found.
common/src/main/java/com/wecloud/im/controller/ImClientController.java
View file @
c236957f
...
@@ -18,6 +18,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -18,6 +18,7 @@ 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.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
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.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -57,11 +58,11 @@ public class ImClientController extends BaseController {
...
@@ -57,11 +58,11 @@ public class ImClientController extends BaseController {
/**
/**
* 获取用户
在线状
态
* 获取用户态
*
*
* @return true:在线, false 不在线
* @return true:在线, false 不在线
*/
*/
@
PostMapping
(
"/getO
nlineStatus"
)
@
GetMapping
(
"/o
nlineStatus"
)
@OperationLog
(
name
=
"获取用户在线状态"
,
type
=
OperationLogType
.
ADD
)
@OperationLog
(
name
=
"获取用户在线状态"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"获取用户在线状态"
)
@ApiOperation
(
value
=
"获取用户在线状态"
)
ApiResult
<
ImOnlineStatusVo
>
getOnlineStatus
(
String
clientId
)
{
ApiResult
<
ImOnlineStatusVo
>
getOnlineStatus
(
String
clientId
)
{
...
...
common/src/main/java/com/wecloud/im/vo/OfflineMsgDto.java
View file @
c236957f
...
@@ -43,9 +43,12 @@ public class OfflineMsgDto implements Serializable {
...
@@ -43,9 +43,12 @@ public class OfflineMsgDto implements Serializable {
@ApiModelProperty
(
"at他人,传入客户端id数组"
)
@ApiModelProperty
(
"at他人,传入客户端id数组"
)
private
String
at
;
private
String
at
;
@ApiModelProperty
(
"未读人数
,
已读为0"
)
@ApiModelProperty
(
"未读人数
统计,全部人
已读为0"
)
private
Integer
notReadCount
;
private
Integer
notReadCount
;
@ApiModelProperty
(
"未接收人数统计,全部人已接收为0"
)
private
Integer
notReceiverCount
;
// @ApiModelProperty("读取时间")
// @ApiModelProperty("读取时间")
// private Date readTime;
// private Date readTime;
//
//
...
...
common/src/main/resources/mapper/ImMessageMapper.xml
View file @
c236957f
...
@@ -33,7 +33,12 @@
...
@@ -33,7 +33,12 @@
im_message.`at`,
im_message.`at`,
im_message.send_status,
im_message.send_status,
im_message.fk_conversation_id,
im_message.fk_conversation_id,
(SELECT COUNT(id) FROM im_inbox WHERE fk_msg_id = msgId AND read_msg_status = 0) AS not_read_count
(SELECT COUNT(id) FROM im_inbox WHERE fk_msg_id = msgId AND read_msg_status = 0) AS not_read_count,
(SELECT COUNT(id)
FROM im_inbox
WHERE fk_msg_id = msgId
AND receiver_msg_status = 0) AS not_receiver_count
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
INNER JOIN `im_client` ON `im_client`.id = `im_message`.sender
...
@@ -54,7 +59,11 @@
...
@@ -54,7 +59,11 @@
im_message.`at`,
im_message.`at`,
im_message.send_status,
im_message.send_status,
im_message.fk_conversation_id,
im_message.fk_conversation_id,
(SELECT COUNT(id) FROM im_inbox WHERE fk_msg_id = msgId AND read_msg_status = 0) AS not_read_count
(SELECT COUNT(id) FROM im_inbox WHERE fk_msg_id = msgId AND read_msg_status = 0) AS not_read_count,
(SELECT COUNT(id)
FROM im_inbox
WHERE fk_msg_id = msgId
AND receiver_msg_status = 0) AS not_receiver_count
FROM `im_message`
FROM `im_message`
INNER JOIN `im_client` ON `im_client`.id = `im_message`.sender
INNER JOIN `im_client` ON `im_client`.id = `im_message`.sender
WHERE fk_conversation_id = #{param.conversationId}
WHERE fk_conversation_id = #{param.conversationId}
...
...
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