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
26d62908
Commit
26d62908
authored
Apr 27, 2022
by
罗长华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws长连接增加群聊设置 群成员聊天设置接口
parent
531b487e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
core/src/main/java/com/wecloud/im/action/ConversationAction.java
+14
-0
core/src/main/java/com/wecloud/im/action/ConversationMembersAction.java
+17
-2
core/src/main/java/com/wecloud/im/controller/ImConversationController.java
+1
-1
No files found.
core/src/main/java/com/wecloud/im/action/ConversationAction.java
View file @
26d62908
...
...
@@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated;
import
com.alibaba.fastjson.JSON
;
import
com.wecloud.dispatch.annotation.ActionMapping
;
import
com.wecloud.im.param.DisbandConversationParam
;
import
com.wecloud.im.param.GroupChatSettingParam
;
import
com.wecloud.im.param.ImConversationQueryParam
;
import
com.wecloud.im.param.MutedGroupMemberParam
;
import
com.wecloud.im.param.MutedGroupParam
;
...
...
@@ -228,4 +229,17 @@ public class ConversationAction {
imConversationService
.
updateDisplayConversation
(
data
);
return
WsResponse
.
ok
();
}
/**
* 群聊设置
*/
@ActionMapping
(
"/groupChatSetting"
)
@ApiOperation
(
value
=
"群聊设置"
,
notes
=
"权限:群主和管理员有权限操作"
)
public
WsResponse
<
Map
<
String
,
Boolean
>>
groupChatSetting
(
@Validated
GroupChatSettingParam
data
)
{
log
.
info
(
"群聊设置入参 {}"
,
JSON
.
toJSONString
(
data
));
Boolean
r
=
imConversationService
.
groupChatSetting
(
data
);
Map
<
String
,
Boolean
>
result
=
new
HashMap
<>();
result
.
put
(
"result"
,
r
);
return
WsResponse
.
ok
(
result
);
}
}
core/src/main/java/com/wecloud/im/action/ConversationMembersAction.java
View file @
26d62908
...
...
@@ -11,8 +11,10 @@ import java.util.Map;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
com.wecloud.dispatch.annotation.ActionMapping
;
import
com.wecloud.im.param.ChatSettingParam
;
import
com.wecloud.im.param.ImConvMemeClientRemarkNameParam
;
import
com.wecloud.im.param.ListConversationMembersParam
;
import
com.wecloud.im.param.add.ImConversationMemAttrUpdate
;
...
...
@@ -67,10 +69,23 @@ public class ConversationMembersAction {
@ActionMapping
(
"/getList"
)
@ApiOperation
(
value
=
"获取会话中成员表列表"
)
public
WsResponse
<
Map
<
String
,
List
<
ConversationMemberVo
>>>
getImConversationMembersList
(
@Validated
ListConversationMembersParam
data
)
throws
Exception
{
List
<
ConversationMemberVo
>
conversationMemberVoList
=
imConversationMembersService
.
getImConversationMembersList
(
data
);
List
<
ConversationMemberVo
>
conversationMemberVoList
=
imConversationMembersService
.
getImConversationMembersList
(
data
);
Map
<
String
,
List
<
ConversationMemberVo
>>
result
=
new
HashMap
<>();
result
.
put
(
"result"
,
conversationMemberVoList
);
return
WsResponse
.
ok
(
result
);
}
/**
* 聊天设置
* @Author luozh
* @Date 2022年04月26日 11:48:59
* @param
* @Return
*/
@ApiOperation
(
value
=
"聊天设置"
)
@ActionMapping
(
"/chatSetting"
)
public
WsResponse
<
Map
<
String
,
Boolean
>>
chatSetting
(
@RequestBody
ChatSettingParam
param
)
{
imConversationMembersService
.
chatSetting
(
param
);
return
WsResponse
.
ok
();
}
}
core/src/main/java/com/wecloud/im/controller/ImConversationController.java
View file @
26d62908
...
...
@@ -214,7 +214,7 @@ public class ImConversationController extends BaseController {
@PostMapping
(
"/groupChatSetting"
)
@ApiOperation
(
value
=
"群聊设置"
,
notes
=
"权限:群主和管理员有权限操作"
)
public
ApiResult
<
Boolean
>
groupChatSetting
(
@RequestBody
@Validated
GroupChatSettingParam
param
)
{
log
.
info
(
"群
禁言、取消群禁言
入参 {}"
,
JSON
.
toJSONString
(
param
));
log
.
info
(
"群
聊设置
入参 {}"
,
JSON
.
toJSONString
(
param
));
Boolean
result
=
imConversationService
.
groupChatSetting
(
param
);
return
ApiResult
.
ok
(
result
);
}
...
...
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