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
a2e2b42f
...
a2e2b42fd577cb1d9bb870d1136b9fe63f67f339
authored
2022-06-13 09:50:19 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.为关注、绑定功能添加必要的参数校验和日志输出
1 parent
77aaa301
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
8 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/impl/UserOperationServiceImpl.java
member-service-impl/src/main/resources/config/application-dev.yml
member-service-impl/src/main/java/com/topdraw/business/process/rest/UserOperationController.java
View file @
a2e2b42
...
...
@@ -360,6 +360,12 @@ public class UserOperationController {
// 大屏账户
String
platformAccount
=
iptvUserInfo
.
getString
(
"platformAccount"
);
if
(
StringUtils
.
isBlank
(
platformAccount
))
{
log
.
warn
(
"绑定失败,platformAccount is null "
);
return
ResultInfo
.
failure
(
"绑定失败"
);
}
try
{
String
headimgurl
=
iptvUserInfo
.
get
(
"headimgurl"
).
toString
();
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
a2e2b42
...
...
@@ -472,18 +472,29 @@ public class UserOperationServiceImpl implements UserOperationService {
// 修改会员信息
MemberDTO
_memberDTO1
=
this
.
doUpdateMemberByMemberDTO
(
memberDTO
);
log
.
info
(
"发送关注消息至大屏侧,发送的账号信息 ==>> {} || 会员信息 ==>> {}"
,
_userWeixinDTO
,
_memberDTO1
);
// 同步至iptv
((
UserOperationServiceImpl
)
AopContext
.
currentProxy
()).
asyncSubscribe
(
new
MemberAndWeixinUserDTO
(
_memberDTO1
,
_userWeixinDTO
));
// 大屏信息
JSONObject
iptvUserInfo
=
resources
.
getIptvUserInfo
();
if
(
Objects
.
nonNull
(
iptvUserInfo
))
{
log
.
info
(
"存储的大小屏账号信息 iptvUserInfo ==>> {}"
,
iptvUserInfo
);
if
(
Objects
.
nonNull
(
iptvUserInfo
))
{
// 大屏账户
String
platformAccount
=
iptvUserInfo
.
getString
(
"platformAccount"
);
log
.
info
(
"存储的大屏账号信息 platformAccount ==>> {}"
,
platformAccount
);
log
.
info
(
"绑定开始"
);
if
(
StringUtils
.
isBlank
(
platformAccount
))
{
log
.
warn
(
"绑定失败,platformAccount is null "
);
return
false
;
}
// 绑定
this
.
bind
(
memberDTO
,
platformAccount
);
log
.
info
(
"绑定结束"
);
}
// 保存关注记录
...
...
@@ -559,6 +570,7 @@ public class UserOperationServiceImpl implements UserOperationService {
// 会员
MemberDTO
memberDTO
=
this
.
findMemberByUserWeixinDTO
(
userWeixinDTO
);
memberDTO
.
setUserIptvId
(
null
);
// 修改会员vip,如果没有购买会员则取消团粉
MemberDTO
_memberDTO
=
this
.
doUpdateMemberVip
(
memberDTO
,
0
);
...
...
@@ -1017,6 +1029,10 @@ public class UserOperationServiceImpl implements UserOperationService {
@Transactional
(
propagation
=
Propagation
.
SUPPORTS
,
readOnly
=
true
,
rollbackFor
=
Exception
.
class
)
public
void
bind
(
MemberDTO
memberDTO
,
UserTvDTO
userTvDTO
)
{
String
platformAccount
=
userTvDTO
.
getPlatformAccount
();
if
(
StringUtils
.
isBlank
(
platformAccount
))
{
return
;
}
// 绑定
this
.
bind
(
memberDTO
,
platformAccount
);
}
...
...
@@ -1029,8 +1045,9 @@ public class UserOperationServiceImpl implements UserOperationService {
*/
@Override
public
UserTvDTO
bind
(
MemberDTO
memberDTO
,
String
platformAccount
)
{
log
.
info
(
"bind start"
);
MemberDTO
memberDTO1
=
this
.
memberService
.
findByCode
(
memberDTO
.
getCode
());
log
.
info
(
"查询会员信息 ==>> {}"
,
memberDTO1
);
if
(
Objects
.
nonNull
(
memberDTO1
.
getUserIptvId
()))
{
UserTvDTO
userTvDTO
=
this
.
userTvService
.
findById
(
memberDTO1
.
getUserIptvId
());
return
userTvDTO
;
...
...
@@ -1038,6 +1055,7 @@ public class UserOperationServiceImpl implements UserOperationService {
// 大屏账户
UserTvDTO
userTvDTO
=
this
.
userTvService
.
findByPlatformAccount
(
platformAccount
);
log
.
info
(
"查询大屏账号信息 ==>> {}"
,
userTvDTO
);
if
(
Objects
.
isNull
(
userTvDTO
))
{
throw
new
BadRequestException
(
GlobeExceptionMsg
.
IPTV_IS_NULL
);
}
...
...
@@ -1074,6 +1092,10 @@ public class UserOperationServiceImpl implements UserOperationService {
// 修改会员
MemberDTO
_memberDTO
=
this
.
doUpdateMemberByMemberDTO
(
memberDTO
);
_memberDTO
.
setPlatformAccount
(
platformAccount
);
log
.
info
(
"发送到大屏侧的消息对象 会员信息 ==>> {} || 账号信息 ==>> {}"
,
_memberDTO
,
_userTvDTO
);
// 同步至iptv
((
UserOperationServiceImpl
)
AopContext
.
currentProxy
()).
asyncAppletBind
(
new
MemberAndUserTvDTO
(
_memberDTO
,
_userTvDTO
));
...
...
member-service-impl/src/main/resources/config/application-dev.yml
View file @
a2e2b42
...
...
@@ -2,9 +2,12 @@
spring
:
datasource
:
# 测试/演示库url:
url
:
jdbc:log4jdbc:mysql://139.196.192.242:3306/tj_user_0819?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
# url: jdbc:log4jdbc:mysql://122.112.214.149:3306/tj_user_admin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
# username: root
# password: root
url
:
jdbc:log4jdbc:mysql://139.196.145.150:3306/ucs_admin_chongshu?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username
:
root
password
:
Tjlh@20
17
password
:
Tjlh@20
21
driverClassName
:
net.sf.log4jdbc.sql.jdbcapi.DriverSpy
#Druid
...
...
@@ -66,7 +69,7 @@ spring:
# publisher-confirms: true #如果对异步消息需要回调必须设置为true
host
:
122.112.214.149
# rabbitmq的连接地址
port
:
5672
# rabbitmq的连接端口号
virtual-host
:
member_center
# rabbitmq的虚拟hosthhh
virtual-host
:
member_center
_small_chongshu
# rabbitmq的虚拟hosthhh
username
:
guest
# rabbitmq的用户名
password
:
guest
# rabbitmq的密码
publisher-confirms
:
true
#如果对异步消息需要回调必须设置为true
...
...
@@ -104,8 +107,8 @@ file:
service
:
mq
:
exchange
:
uce.exchange
queue
:
uce.queue
exchange
:
exchange.MemberInfoSync
queue
:
queue.MemberInfoSync
weixin
:
list
:
...
...
Please
register
or
sign in
to post a comment