Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张云鹏
/
uc-engine
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
0ea9b74c
...
0ea9b74cd050c238330680fcc75b8be005948f63
authored
2022-03-09 20:06:32 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改保存大小屏H5服务逻辑
1 parent
c2352660
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
9 deletions
member-service-impl/src/main/java/com/topdraw/business/process/rest/UserOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/service/UserOperationService.java
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/UserOperationController.java
View file @
0ea9b74
...
...
@@ -380,23 +380,42 @@ public class UserOperationController {
String
unionid
=
json
.
getString
(
"unionid"
);
Assert
.
state
(
StrUtil
.
isNotBlank
(
unionid
),
"unionid不可为空"
);
List
<
Object
>
resultList
=
new
ArrayList
<>();
// 大屏侧通过返回值来展示对应的小程序页面
String
result
=
SUBSCRIBE
;
String
platformAccount1
=
""
;
// 保存大小屏信息到redis同时返回小屏信息
UserWeixinDTO
userWeixinDTO
=
this
.
userTvOperationService
.
saveUserInfo
(
data
);
// 小屏会员
MemberDTO
memberDTO
=
this
.
memberService
.
findById
(
userWeixinDTO
.
getMemberId
());
// 小屏用户不存在或者关注状态为未关注(0),返回未关注
if
(
Objects
.
isNull
(
userWeixinDTO
)
||
Objects
.
isNull
(
userWeixinDTO
.
getId
())
||
userWeixinDTO
.
getStatus
()
!=
SUBSCRIBE_STATUS
)
{
result
=
UNSUBSCRIBE
;
return
ResultInfo
.
success
(
result
);
if
(
Objects
.
nonNull
(
memberDTO
))
{
// 检查是否绑定,返回绑定的大屏账户
UserTvDTO
userTvDTO
=
this
.
userOperationService
.
checkBind
(
memberDTO
);
if
(
Objects
.
nonNull
(
userTvDTO
))
{
platformAccount1
=
userTvDTO
.
getPlatformAccount
();
}
}
else
{
log
.
info
(
"userWeixinDTO ==>> [{}]"
,
userWeixinDTO
);
throw
new
EntityNotFoundException
(
MemberDTO
.
class
,
"code"
,
"member is null !!"
);
}
resultList
.
add
(
result
);
resultList
.
add
(
platformAccount1
);
log
.
info
(
"saveUserInfo ==>> result ==>> [{}]"
,
resultList
);
return
ResultInfo
.
success
(
resultList
);
}
/***************************************************************************************/
String
platformAccount1
=
""
;
// 关注未绑定
if
(
result
.
equalsIgnoreCase
(
SUBSCRIBE
))
{
// 小屏会员
MemberDTO
memberDTO
=
this
.
memberService
.
findById
(
userWeixinDTO
.
getMemberId
());
// redis中的大小屏信息
String
content
=
(
String
)
this
.
redisUtils
.
get
(
RedisKeyUtil
.
genSeSuSubscribeKey
(
unionid
));
...
...
@@ -434,7 +453,7 @@ public class UserOperationController {
}
/****************************************************************************************/
List
<
Object
>
resultList
=
new
ArrayList
<>();
resultList
.
add
(
result
);
resultList
.
add
(
platformAccount1
);
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/UserOperationService.java
View file @
0ea9b74
...
...
@@ -148,4 +148,5 @@ public interface UserOperationService {
UserTvDTO
bind
(
MemberDTO
memberDTO
,
String
platformAccount
);
UserTvDTO
checkBind
(
MemberDTO
memberDTO
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
0ea9b74
...
...
@@ -1580,13 +1580,14 @@ public class UserOperationServiceImpl implements UserOperationService {
this
.
bind
(
memberDTO
,
platformAccount
);
}
@Override
public
UserTvDTO
bind
(
MemberDTO
memberDTO
,
String
platformAccount
)
{
MemberDTO
memberDTO1
=
this
.
memberService
.
getByCode
(
memberDTO
.
getCode
());
if
(
Objects
.
nonNull
(
memberDTO1
.
getUserIptvId
()))
{
UserTvDTO
userTvDTO
=
this
.
userTvService
.
findById
(
memberDTO1
.
getUserIptvId
());
return
userTvDTO
;
UserTvDTO
userTvDTO1
=
this
.
checkBind
(
memberDTO
);
if
(
Objects
.
nonNull
(
userTvDTO1
))
{
return
userTvDTO1
;
}
// 大屏账户
...
...
@@ -1610,6 +1611,16 @@ public class UserOperationServiceImpl implements UserOperationService {
return
null
;
}
@Override
public
UserTvDTO
checkBind
(
MemberDTO
memberDTO
)
{
MemberDTO
memberDTO1
=
this
.
memberService
.
getByCode
(
memberDTO
.
getCode
());
if
(
Objects
.
nonNull
(
memberDTO1
.
getUserIptvId
()))
{
UserTvDTO
userTvDTO
=
this
.
userTvService
.
findById
(
memberDTO1
.
getUserIptvId
());
return
userTvDTO
;
}
return
null
;
}
/**
*
* @param userWeixinDTO1
...
...
Please
register
or
sign in
to post a comment