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
f3db1106
Commit
f3db1106
authored
May 07, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取会话列表
parent
730b5c4e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
config/src/main/resources/config/application-dev.yml
+1
-1
core/src/main/java/com/wecloud/im/controller/ImConversationController.java
+1
-1
core/src/main/java/com/wecloud/im/param/ListConversationParam.java
+1
-1
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
+4
-2
No files found.
config/src/main/resources/config/application-dev.yml
View file @
f3db1106
...
@@ -20,7 +20,7 @@ spring:
...
@@ -20,7 +20,7 @@ spring:
# password: 123456
# password: 123456
# 测试外网
# 测试外网
url
:
jdbc:mysql://12
1.37.22.224:3306/wecloud_im_feature_cluster
?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
url
:
jdbc:mysql://12
4.71.83.11:3306/wecloud_im
?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
username
:
root
username
:
root
password
:
temple123456
password
:
temple123456
...
...
core/src/main/java/com/wecloud/im/controller/ImConversationController.java
View file @
f3db1106
...
@@ -259,7 +259,7 @@ public class ImConversationController extends BaseController {
...
@@ -259,7 +259,7 @@ public class ImConversationController extends BaseController {
*/
*/
@PostMapping
(
"/listConversation"
)
@PostMapping
(
"/listConversation"
)
@ApiOperation
(
value
=
"批量查找会话信息"
,
notes
=
"会话"
)
@ApiOperation
(
value
=
"批量查找会话信息"
,
notes
=
"会话"
)
public
ApiResult
<
List
<
ConversationVo
>>
listConversation
(
ListConversationParam
param
)
{
public
ApiResult
<
List
<
ConversationVo
>>
listConversation
(
@RequestBody
ListConversationParam
param
)
{
List
<
ConversationVo
>
conversationList
=
imConversationService
.
listConversation
(
param
);
List
<
ConversationVo
>
conversationList
=
imConversationService
.
listConversation
(
param
);
return
ApiResult
.
ok
(
conversationList
);
return
ApiResult
.
ok
(
conversationList
);
}
}
...
...
core/src/main/java/com/wecloud/im/param/ListConversationParam.java
View file @
f3db1106
...
@@ -26,7 +26,7 @@ public class ListConversationParam extends BaseEntity {
...
@@ -26,7 +26,7 @@ public class ListConversationParam extends BaseEntity {
private
Integer
chatType
;
private
Integer
chatType
;
@ApiModelProperty
(
"会话id列表"
)
@ApiModelProperty
(
"会话id列表"
)
private
List
<
Long
>
conversationIds
;
private
String
conversationIds
;
...
...
core/src/main/java/com/wecloud/im/service/impl/ImConversationServiceImpl.java
View file @
f3db1106
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.chanjx.utils.StringUtils
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.wecloud.im.chatroom.cache.ChatRoomCacheManager
;
import
com.wecloud.im.chatroom.cache.ChatRoomCacheManager
;
...
@@ -1298,14 +1299,15 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
...
@@ -1298,14 +1299,15 @@ public class ImConversationServiceImpl extends BaseServiceImpl<ImConversationMap
@Override
@Override
public
List
<
ConversationVo
>
listConversation
(
ListConversationParam
param
)
{
public
List
<
ConversationVo
>
listConversation
(
ListConversationParam
param
)
{
if
(
CollectionUtils
.
isEmpty
(
param
.
getConversationIds
()))
{
if
(
StringUtils
.
isBlank
(
param
.
getConversationIds
()))
{
throw
new
BusinessException
(
"会话id列表不可为空"
);
throw
new
BusinessException
(
"会话id列表不可为空"
);
}
}
List
<
Long
>
conversationIds
=
(
List
)
JSON
.
parse
(
param
.
getConversationIds
());
List
<
ConversationVo
>
conversationVoList
=
Lists
.
newArrayList
();
List
<
ConversationVo
>
conversationVoList
=
Lists
.
newArrayList
();
List
<
ImConversation
>
conversations
=
imConversationMapper
.
selectList
(
List
<
ImConversation
>
conversations
=
imConversationMapper
.
selectList
(
new
QueryWrapper
<
ImConversation
>().
lambda
()
new
QueryWrapper
<
ImConversation
>().
lambda
()
.
eq
(
ImConversation:
:
getChatType
,
param
.
getChatType
())
.
eq
(
ImConversation:
:
getChatType
,
param
.
getChatType
())
.
in
(
ImConversation:
:
getId
,
param
.
getConversationIds
()
)
.
in
(
ImConversation:
:
getId
,
conversationIds
)
.
orderByDesc
(
ImConversation:
:
getId
)
.
orderByDesc
(
ImConversation:
:
getId
)
);
);
if
(
CollectionUtils
.
isEmpty
(
conversations
))
{
if
(
CollectionUtils
.
isEmpty
(
conversations
))
{
...
...
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