Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
向汉
/
uc-consumer
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
5d345d7d
...
5d345d7dfd971ae5220a1ab38d456595c7143ad1
authored
2022-05-22 00:01:57 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.update
1 parent
732860d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
5d345d7
...
...
@@ -205,6 +205,39 @@ public class UserOperationServiceImpl implements UserOperationService {
}
@Transactional
(
propagation
=
Propagation
.
SUPPORTS
,
rollbackFor
=
Exception
.
class
)
public
void
asyncSubscribe
(
MemberAndWeixinUserDTO
memberAndWeixinUserDTO
)
{
UserWeixinDTO
userWeixinDTO
=
memberAndWeixinUserDTO
.
getUserWeixinDTO
();
String
openid
=
userWeixinDTO
.
getOpenid
();
String
unionid
=
userWeixinDTO
.
getUnionid
();
String
appid
=
userWeixinDTO
.
getAppid
();
MemberDTO
memberDTO
=
memberAndWeixinUserDTO
.
getMemberDTO
();
UserWeixinDTO
_userWeixinDTO
=
this
.
userWeixinService
.
findFirstByUnionIdAndAppIdAndOpenId
(
unionid
,
appid
,
openid
);
if
(
Objects
.
nonNull
(
_userWeixinDTO
))
{
// 账号存在,修改账号和会员
this
.
updateWeixin
(
_userWeixinDTO
,
userWeixinDTO
);
MemberDTO
_memberDTO
=
this
.
memberService
.
findById
(
_userWeixinDTO
.
getMemberId
());
if
(
Objects
.
nonNull
(
_memberDTO
))
{
memberDTO
.
setUserIptvId
(
_memberDTO
.
getUserIptvId
());
this
.
updateMember
(
_memberDTO
,
memberDTO
);
}
else
{
throw
new
EntityNotFoundException
(
MemberDTO
.
class
,
"id"
,
GlobeExceptionMsg
.
MEMBER_ID_IS_NULL
);
}
}
else
{
throw
new
EntityNotFoundException
(
UserWeixinDTO
.
class
,
"id"
,
GlobeExceptionMsg
.
WEIXIN_IS_NULL
);
}
}
@Transactional
(
propagation
=
Propagation
.
SUPPORTS
,
rollbackFor
=
Exception
.
class
)
public
void
asyncUnsubscribe
(
MemberAndWeixinUserDTO
memberAndWeixinUserDTO
)
{
UserWeixinDTO
userWeixinDTO
=
memberAndWeixinUserDTO
.
getUserWeixinDTO
();
String
openid
=
userWeixinDTO
.
getOpenid
();
...
...
Please
register
or
sign in
to post a comment