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
49ecc9f4
Commit
49ecc9f4
authored
Jun 15, 2022
by
Shadow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug
parent
571c0cb2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
core/src/main/java/com/wecloud/im/controller/ImClientController.java
+1
-1
core/src/main/java/com/wecloud/im/param/RegisterClientParam.java
+3
-2
im-sdk/src/main/java/com/wecloud/im/sdk/internal/WecloudImUserOperation.java
+1
-1
No files found.
core/src/main/java/com/wecloud/im/controller/ImClientController.java
View file @
49ecc9f4
...
...
@@ -178,7 +178,7 @@ public class ImClientController extends BaseController {
@PostMapping
(
"/registerClient"
)
@ApiOperation
(
value
=
"注册客户端"
)
ApiResult
<
RegisterClientResponse
>
registerClient
(
@RequestBody
RegisterClientParam
param
)
{
ApiResult
<
RegisterClientResponse
>
registerClient
(
@
Validated
@
RequestBody
RegisterClientParam
param
)
{
Long
clientId
=
imClientService
.
registerClient
(
param
);
RegisterClientResponse
response
=
new
RegisterClientResponse
();
response
.
setUserId
(
clientId
);
...
...
core/src/main/java/com/wecloud/im/param/RegisterClientParam.java
View file @
49ecc9f4
...
...
@@ -3,6 +3,7 @@ package com.wecloud.im.param;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
...
...
@@ -17,9 +18,9 @@ public class RegisterClientParam {
/**
* app 用户id
*/
@Not
Null
(
message
=
"用户id 不能为空"
)
@Not
Blank
(
message
=
"用户id 不能为空"
)
@ApiModelProperty
(
"用户id"
)
private
Lo
ng
userId
;
private
Stri
ng
userId
;
/**
* 头像
...
...
im-sdk/src/main/java/com/wecloud/im/sdk/internal/WecloudImUserOperation.java
View file @
49ecc9f4
...
...
@@ -62,7 +62,7 @@ public class WecloudImUserOperation extends WecloudImOperation {
assertParameterNotNull
(
userId
,
"userId"
);
// 校验通过 构建参数
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"
client
Id"
,
registerClientRequest
.
getUserId
()
+
""
);
param
.
put
(
"
user
Id"
,
registerClientRequest
.
getUserId
()
+
""
);
param
.
put
(
"headPortrait"
,
Optional
.
ofNullable
(
registerClientRequest
.
getHeadPortrait
()).
orElse
(
""
));
param
.
put
(
"nickname"
,
Optional
.
ofNullable
(
registerClientRequest
.
getNickname
()).
orElse
(
""
));
// 发送请求
...
...
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