Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-communication
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
xingmin
yd-communication
Commits
22b90e6a
Commit
22b90e6a
authored
Aug 11, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
a50e6eba
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
4 deletions
+42
-4
yd-communication-api/src/main/java/com/yd/communication/api/service/impl/ApiCoSessionServiceImpl.java
+8
-1
yd-communication-feign/src/main/java/com/yd/communication/feign/dto/RoomRedisInfoDTO.java
+10
-0
yd-communication-feign/src/main/java/com/yd/communication/feign/response/JoinResponse.java
+11
-0
yd-communication-feign/src/main/java/com/yd/communication/feign/response/http/GenerateTokenResponse.java
+13
-3
No files found.
yd-communication-api/src/main/java/com/yd/communication/api/service/impl/ApiCoSessionServiceImpl.java
View file @
22b90e6a
...
...
@@ -127,6 +127,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
// 获取 Token(调用 /user/generate/token)
String
token
=
null
;
GenerateTokenResponse
tokenResp
=
null
;
try
{
// 构建请求体
GenerateTokenRequest
tokenRequest
=
new
GenerateTokenRequest
();
...
...
@@ -159,7 +160,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
// 或者直接使用 fastjson 转换
Object
data
=
body
.
getData
();
if
(
data
!=
null
)
{
GenerateTokenResponse
tokenResp
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
data
),
GenerateTokenResponse
.
class
);
tokenResp
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
data
),
GenerateTokenResponse
.
class
);
token
=
tokenResp
.
getToken
();
}
}
...
...
@@ -178,6 +179,10 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
// 存入 Redis
RoomRedisInfoDTO
roomRedisInfoDTO
=
new
RoomRedisInfoDTO
();
if
(
tokenResp
!=
null
)
{
roomRedisInfoDTO
.
setName
(
tokenResp
.
getName
());
roomRedisInfoDTO
.
setMobile
(
tokenResp
.
getMobile
());
}
roomRedisInfoDTO
.
setToken
(
token
);
// 设置 token
roomRedisInfoDTO
.
setUserId
(
userId
);
roomRedisInfoDTO
.
setControlHolderType
(
session
.
getControlHolderType
());
...
...
@@ -343,6 +348,8 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
}
joinResponse
.
setUserId
(
roomRedisInfoDTO
.
getUserId
());
joinResponse
.
setToken
(
roomRedisInfoDTO
.
getToken
());
joinResponse
.
setName
(
roomRedisInfoDTO
.
getName
());
joinResponse
.
setMobile
(
roomRedisInfoDTO
.
getMobile
());
log
.
info
(
"【加入会话】成功, roomId={}, participantId={}, controlHolderType={}"
,
session
.
getRoomId
(),
session
.
getParticipantId
(),
session
.
getControlHolderType
());
...
...
yd-communication-feign/src/main/java/com/yd/communication/feign/dto/RoomRedisInfoDTO.java
View file @
22b90e6a
...
...
@@ -41,4 +41,14 @@ public class RoomRedisInfoDTO implements Serializable {
* 资源所有者的登录token信息
*/
private
String
token
;
/**
* 姓名
*/
private
String
name
;
/**
* 手机号
*/
private
String
mobile
;
}
yd-communication-feign/src/main/java/com/yd/communication/feign/response/JoinResponse.java
View file @
22b90e6a
...
...
@@ -47,4 +47,14 @@ public class JoinResponse {
* 资源所有者的登录token信息
*/
private
String
token
;
/**
* 姓名
*/
private
String
name
;
/**
* 手机号
*/
private
String
mobile
;
}
\ No newline at end of file
yd-communication-feign/src/main/java/com/yd/communication/feign/response/http/GenerateTokenResponse.java
View file @
22b90e6a
...
...
@@ -6,17 +6,27 @@ import lombok.Data;
public
class
GenerateTokenResponse
{
/**
* token
*
SFP的
token
*/
private
String
token
;
/**
* 商城用户ID
*
SFP
商城用户ID
*/
private
Long
sfpUserId
;
/**
* 分销用户ID
* SFP姓名
*/
private
String
name
;
/**
* SFP手机号
*/
private
String
mobile
;
/**
* CFFP分销用户ID
*/
private
Long
cffpUserId
;
}
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