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
892714ab
...
892714ab5f7b228f31e85375628f99b6c9e004d1
authored
2022-05-31 21:15:59 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.优化
1 parent
4d95d9c6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
14 deletions
member-service-impl/src/main/java/com/topdraw/business/module/member/profile/rest/MemberProfileController.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/module/member/profile/rest/MemberProfileController.java
View file @
892714a
...
...
@@ -37,8 +37,6 @@ public class MemberProfileController {
log
.
info
(
"memberProfile ==>> update ==>> resources ===>> [{}]"
,
resources
);
MemberProfileDTO
memberProfileDTO
=
this
.
memberProfileOperationService
.
updateMemberProfileAndMember
(
resources
);
log
.
info
(
"memberProfile ==>> update ==>> result ===>> [{}]"
,
memberProfileDTO
);
return
ResultInfo
.
success
(
memberProfileDTO
);
}
...
...
@@ -47,6 +45,7 @@ public class MemberProfileController {
@AnonymousAccess
public
ResultInfo
updateMemberProfileAndMember
(
@Validated
@RequestBody
MemberProfile
resources
)
{
log
.
info
(
"MemberProfileServiceImpl ==>> update ==>> resources ===>> [{}]"
,
resources
);
MemberProfileDTO
memberProfileDTO
=
this
.
memberProfileOperationService
.
updateMemberProfileAndMember
(
resources
);
return
ResultInfo
.
success
(
memberProfileDTO
);
}
...
...
@@ -58,9 +57,8 @@ public class MemberProfileController {
public
ResultInfo
create
(
@Validated
(
value
=
{
CreateGroup
.
class
})
@RequestBody
MemberProfile
resources
)
{
log
.
info
(
"memberProfile ==>> update ==>> resources ===>> [{}]"
,
resources
);
MemberProfileDTO
memberProfileDTO
=
this
.
memberProfileOperationService
.
createMemberProfileAndSyncMember
(
resources
);
log
.
info
(
"memberProfile ==>> update ==>> result ===>> [{}]"
,
memberProfileDTO
);
MemberProfileDTO
memberProfileDTO
=
this
.
memberProfileOperationService
.
createMemberProfileAndSyncMember
(
resources
);
return
ResultInfo
.
success
(
memberProfileDTO
);
}
}
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
892714a
...
...
@@ -222,7 +222,7 @@ public class UserOperationServiceImpl implements UserOperationService {
String
headimgurl
=
resources
.
getHeadimgurl
();
Integer
sex
=
resources
.
getSex
();
//
账户和会员都存在
//
小屏账号
UserWeixinDTO
userWeixinDTO
=
this
.
findFirstByAppIdAndOpenId
(
appId
,
openId
);
if
(
Objects
.
nonNull
(
userWeixinDTO
.
getId
())
&&
Objects
.
nonNull
(
userWeixinDTO
.
getMemberId
()))
{
log
.
error
(
"createWeixinUserAndMember ==>> result ==>> [{}]"
,
userWeixinDTO
);
...
...
@@ -306,12 +306,12 @@ public class UserOperationServiceImpl implements UserOperationService {
// 当前用户的任意微信app,因为同一unionId的会员是唯一的
UserWeixinDTO
_userWeixinDTO
=
this
.
findFirstByUnionId
(
unionId
);
if
(
Objects
.
nonNull
(
_userWeixinDTO
.
getId
()))
{
Assert
.
notNull
(
_userWeixinDTO
.
getMemberId
(),
GlobeExceptionMsg
.
MEMBER_ID_IS_NULL
);
Long
memberId
=
_userWeixinDTO
.
getMemberId
();
if
(
Objects
.
nonNull
(
memberId
))
{
// 小屏会员
MemberDTO
memberDTO
=
this
.
findMemberById
(
_userWeixinDTO
.
getMemberId
()
);
if
(
Objects
.
nonNull
(
memberDTO
))
{
MemberDTO
memberDTO
=
this
.
findMemberById
(
memberId
);
if
(
Objects
.
nonNull
(
memberDTO
.
getId
()
))
{
resources
.
setMemberId
(
_userWeixinDTO
.
getMemberId
());
UserWeixin
userWeixin
=
UserWeixinBuilder
.
build
(
resources
);
...
...
@@ -325,7 +325,25 @@ public class UserOperationServiceImpl implements UserOperationService {
}
throw
new
EntityNotFoundException
(
MemberDTO
.
class
,
"code"
,
GlobeExceptionMsg
.
MEMBER_CODE_IS_NULL
);
}
else
{
// 新建会员
Member
_member
=
MemberBuilder
.
build
(
LocalConstants
.
MEMBER_PLATFORM_TYPE_WEIXIN
,
headimgurl
,
nickname
,
vip
,
sex
);
MemberDTO
memberDTO
=
this
.
createMember
(
_member
);
resources
.
setMemberId
(
_userWeixinDTO
.
getMemberId
());
UserWeixin
userWeixin
=
UserWeixinBuilder
.
build
(
resources
);
UserWeixinDTO
weixinDTO
=
this
.
createWeixinUser
(
userWeixin
,
memberDTO
.
getId
(),
memberDTO
.
getCode
());
weixinDTO
.
setMemberCode
(
memberDTO
.
getCode
());
// 同步至iptv
((
UserOperationServiceImpl
)
AopContext
.
currentProxy
()).
asyncWeixin
(
weixinDTO
);
return
weixinDTO
;
}
}
else
{
...
...
@@ -598,6 +616,7 @@ public class UserOperationServiceImpl implements UserOperationService {
}
}
data
=
json
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
info
(
"头像解析失败!!!"
);
e
.
printStackTrace
();
...
...
member-service-impl/src/main/resources/config/application-dev.yml
View file @
892714a
...
...
@@ -2,12 +2,12 @@
spring
:
datasource
:
# 测试/演示库url:
# url: jdbc:log4jdbc:mysql://1
39.196.192.242:3306/tj_user_0819
?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
# url: jdbc:log4jdbc:mysql://1
22.112.214.149:3306/tj_user_admin
?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
# username: root
# password:
Tjlh@2017
url
:
jdbc:log4jdbc:mysql://1
22.112.214.149:3306/tj_user_admi
n?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
# password:
root
url
:
jdbc:log4jdbc:mysql://1
39.196.145.150:3306/ucs-small-sichua
n?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username
:
root
password
:
root
password
:
Tjlh@2021
driverClassName
:
net.sf.log4jdbc.sql.jdbcapi.DriverSpy
#Druid
...
...
Please
register
or
sign in
to post a comment