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
251b926f
...
251b926fb774855d035786f524c5b9a2cd353a6f
authored
2022-05-30 23:17:00 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.优化
1 parent
030e0364
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
16 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/TaskOperationServiceImpl.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 @
251b926
...
...
@@ -205,7 +205,6 @@ public class UserOperationController {
subscribeBean
.
setSourceInfo
(
sourceInfo
);
}
String
headimgurl
=
iptvUserInfo
.
get
(
"headimgurl"
).
toString
();
String
nickname
=
iptvUserInfo
.
get
(
"nickname"
).
toString
();
if
(
StringUtils
.
isNotBlank
(
nickname
))
{
String
nicknameDecode
=
URLDecoder
.
decode
(
nickname
,
"UTF-8"
);
...
...
@@ -213,10 +212,16 @@ public class UserOperationController {
subscribeBean
.
setNickname
(
nicknameEncode
);
}
String
headimgurl
=
iptvUserInfo
.
get
(
"headimgurl"
).
toString
();
log
.
info
(
"parseSubscribe ==>> headimgurl ==>> {}"
,
headimgurl
);
if
(
StringUtils
.
isNotBlank
(
headimgurl
))
{
String
headimgurlDecode
=
URLDecoder
.
decode
(
headimgurl
,
"UTF-8"
);
String
headImgUrl
=
this
.
downloadWeixinImge
(
headimgurlDecode
);
subscribeBean
.
setHeadimgurl
(
headImgUrl
);
if
(
StringUtils
.
isNotBlank
(
headimgurlDecode
))
{
if
(
headimgurl
.
contains
(
"https"
)
||
headimgurl
.
contains
(
"http"
))
{
headimgurl
=
this
.
downloadWeixinImge
(
headimgurlDecode
);
}
subscribeBean
.
setHeadimgurl
(
headimgurl
);
}
}
}
else
{
...
...
@@ -224,10 +229,10 @@ public class UserOperationController {
// headimgurl
String
headimgurl
=
subscribeBean
.
getHeadimgurl
();
if
(
StringUtils
.
isNotBlank
(
headimgurl
))
{
String
headImgUrl
=
this
.
downloadWeixinImge
(
headimgurl
);
subscribeBean
.
setHeadimgurl
(
headImgUrl
);
if
(
headimgurl
.
contains
(
"https"
)
||
headimgurl
.
contains
(
"http"
))
{
String
headImgUrl
=
this
.
downloadWeixinImge
(
headimgurl
);
subscribeBean
.
setHeadimgurl
(
headImgUrl
);
}
}
}
...
...
@@ -357,6 +362,9 @@ public class UserOperationController {
try
{
String
headimgurl
=
iptvUserInfo
.
get
(
"headimgurl"
).
toString
();
log
.
info
(
"headimgurl ==>> {}"
,
headimgurl
);
String
nickname
=
iptvUserInfo
.
get
(
"nickname"
).
toString
();
if
(
StringUtils
.
isNotBlank
(
nickname
))
{
String
nicknameDecode
=
URLDecoder
.
decode
(
nickname
,
"UTF-8"
);
...
...
@@ -365,10 +373,14 @@ public class UserOperationController {
}
if
(
StringUtils
.
isNotBlank
(
headimgurl
))
{
String
headimgurlDecode
=
URLDecoder
.
decode
(
headimgurl
,
"UTF-8"
);
String
imageEncode
=
Base64Util
.
encode
(
headimgurlDecode
);
String
image
=
RestTemplateClient
.
netImage
(
headimgurlDecode
);
memberDTO
.
setAvatarUrl
(
StringUtils
.
isNotBlank
(
image
)
==
true
?
image:
headimgurlDecode
);
if
(
headimgurl
.
contains
(
"https"
)||
headimgurl
.
contains
(
"http"
))
{
String
headimgurlDecode
=
URLDecoder
.
decode
(
headimgurl
,
"UTF-8"
);
// String imageEncode = Base64Util.encode(headimgurlDecode);
String
image
=
RestTemplateClient
.
netImage
(
headimgurlDecode
);
memberDTO
.
setAvatarUrl
(
StringUtils
.
isNotBlank
(
image
)
==
true
?
image:
headimgurlDecode
);
}
}
}
catch
(
Exception
e
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/TaskOperationServiceImpl.java
View file @
251b926
...
...
@@ -245,7 +245,6 @@ public class TaskOperationServiceImpl implements TaskOperationService {
this
.
grantRight
(
tempRightsMap
);
}
System
.
out
.
println
(
taskList
);
return
ResultInfo
.
success
();
}
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
251b926
...
...
@@ -418,7 +418,7 @@ public class UserOperationServiceImpl implements UserOperationService {
Objects
.
isNull
(
_userWeixinDTO
.
getMemberId
()))
{
UserWeixin
userWeixin
=
new
UserWeixin
();
BeanUtils
.
copyProperties
(
resources
,
userWeixin
);
BeanUtils
.
copyProperties
(
resources
,
userWeixin
);
userWeixin
.
setStatus
(
SUBSCRIBE_STATUS
);
// 创建小屏账户同时创建会员
...
...
@@ -591,9 +591,11 @@ public class UserOperationServiceImpl implements UserOperationService {
String
headimgurl
=
json
.
get
(
"headimgurl"
).
toString
();
if
(
StringUtils
.
isNotBlank
(
headimgurl
))
{
String
headimgurlDecode
=
URLDecoder
.
decode
(
headimgurl
,
"UTF-8"
);
String
image
=
this
.
downloadWeixinImgeFromAppEngine
(
headimgurlDecode
);
if
(
StringUtils
.
isNotBlank
(
image
))
json
.
put
(
"headimgurl"
,
image
);
if
(
headimgurlDecode
.
contains
(
"http"
)
||
headimgurlDecode
.
contains
(
"https"
))
{
String
image
=
this
.
downloadWeixinImgeFromAppEngine
(
headimgurlDecode
);
if
(
StringUtils
.
isNotBlank
(
image
))
json
.
put
(
"headimgurl"
,
image
);
}
}
data
=
json
.
toJSONString
();
}
catch
(
Exception
e
)
{
...
...
Please
register
or
sign in
to post a comment