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
347e9461
...
347e9461ecf2e26462ccfc3194ab0f9cb73df039
authored
2022-07-19 14:12:31 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改部分接口返回值类型
1 parent
2c023a99
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
21 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 @
347e946
...
...
@@ -283,21 +283,21 @@ public class UserOperationController {
@ApiOperation
(
"同步大屏成长报告"
)
@AnonymousAccess
public
ResultInfo
saveGrowthReport
(
@Validated
@RequestBody
String
resources
)
{
log
.
info
(
"同步大屏成长报告
失败
,参数 ==>> [saveGrowthReport#{}]"
,
resources
);
log
.
info
(
"同步大屏成长报告,参数 ==>> [saveGrowthReport#{}]"
,
resources
);
GrowthReportRequest
growthReportRequest
=
JSON
.
parseObject
(
new
String
(
Base64Utils
.
decode
(
resources
.
getBytes
())),
GrowthReportRequest
.
class
);
String
platformAccount
=
growthReportRequest
.
getPlatformAccount
();
log
.
info
(
"同步大屏成长报告消息,大屏账号 ==>> [saveGrowthReport#{}]"
,
platformAccount
);
List
<
GrowthReportRequest
.
CategoryContent
>
playDurationWithCategory
=
growthReportRequest
.
getPlayDurationWithCategory
();
log
.
info
(
"同步大屏成长报告消息主体,消息体 ==>> [saveGrowthReport#{}]"
,
playDurationWithCategory
);
if
(!
CollectionUtils
.
isEmpty
(
playDurationWithCategory
))
{
GrowthReport
growthReport
=
new
GrowthReport
();
growthReport
.
setPlatformAccount
(
platformAccount
);
JSONObject
jsonObject
=
new
JSONObject
();
// jsonObject.put("playDurationWithCategory", JSONArray.toJSONString(playDurationWithCategory));
jsonObject
.
put
(
"playDurationWithCategory"
,
playDurationWithCategory
);
growthReport
.
setData
(
jsonObject
.
toJSONString
());
boolean
result
=
this
.
userOperationService
.
saveGrowthReport
(
growthReport
);
return
ResultInfo
.
success
(
result
);
return
this
.
userOperationService
.
saveGrowthReport
(
growthReport
);
}
return
ResultInfo
.
failure
(
"保存失败"
);
...
...
@@ -595,7 +595,7 @@ public class UserOperationController {
}
else
{
// 账号存在,未关注
if
(
userWeixinDTO
.
getStatus
()
!=
SUBSCRIBE_STATUS
)
{
if
(
!
userWeixinDTO
.
getStatus
().
equals
(
SUBSCRIBE_STATUS
)
)
{
result
=
UNSUBSCRIBE
;
}
...
...
@@ -658,7 +658,7 @@ public class UserOperationController {
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
);
memberDTO
.
setAvatarUrl
(
StringUtils
.
isNotBlank
(
image
)
?
image:
headimgurlDecode
);
}
}
...
...
@@ -693,8 +693,7 @@ public class UserOperationController {
private
String
downloadWeixinImge
(
String
headimgurl
){
try
{
if
(
StringUtils
.
isNotBlank
(
headimgurl
))
{
String
image
=
RestTemplateClient
.
netImage
(
headimgurl
);
return
image
;
return
RestTemplateClient
.
netImage
(
headimgurl
);
}
}
catch
(
Exception
e
)
{
log
.
info
(
"头像解析失败!!!"
);
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/UserOperationService.java
View file @
347e946
...
...
@@ -214,7 +214,7 @@ public interface UserOperationService {
* @param growthReport
* @return
*/
boolean
saveGrowthReport
(
GrowthReport
growthReport
);
ResultInfo
saveGrowthReport
(
GrowthReport
growthReport
);
boolean
appCancellation
(
UserApp
userApp
);
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
347e946
...
...
@@ -173,15 +173,7 @@ public class UserOperationServiceImpl implements UserOperationService {
Integer
accountType
=
resources
.
getAccountType
();
UserAppBindDTO
userAppBindDTO
=
this
.
userAppBindService
.
findFirstByAccountAndAccountType
(
account
,
accountType
);
if
(
Objects
.
nonNull
(
userAppBindDTO
.
getId
()))
{
boolean
result
=
this
.
userAppBindService
.
cancelUserAppBind
(
account
,
accountType
);
/* if (result) {
UserAppBindDTO _userAppBindDTO = new UserAppBindDTO();
_userAppBindDTO.setAccount(account);
_userAppBindDTO.setAccountType(accountType);
((UserOperationServiceImpl) AopContext.currentProxy()).asyncCancelUserAppBind(_userAppBindDTO);
}*/
return
result
;
return
this
.
userAppBindService
.
cancelUserAppBind
(
account
,
accountType
);
}
return
false
;
}
...
...
@@ -279,13 +271,13 @@ public class UserOperationServiceImpl implements UserOperationService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
saveGrowthReport
(
GrowthReport
growthReport
)
{
public
ResultInfo
saveGrowthReport
(
GrowthReport
growthReport
)
{
String
platformAccount
=
growthReport
.
getPlatformAccount
();
UserTvDTO
userTvDTO
=
this
.
userTvService
.
findByPlatformAccount
(
platformAccount
);
if
(
Objects
.
isNull
(
userTvDTO
.
getId
()))
{
log
.
error
(
"保存成长报告失败,大屏信息不存在[saveGrowthReport#]"
);
return
false
;
return
ResultInfo
.
failure
(
"保存成长报告失败,大屏信息不存在"
)
;
}
String
weekFirstDay
=
com
.
topdraw
.
util
.
DateUtil
.
getWeekFirstDay
();
...
...
@@ -298,14 +290,16 @@ public class UserOperationServiceImpl implements UserOperationService {
growthReport
.
setMemberId
(
memberId
);
growthReport
.
setStartDate
(
weekFirstDay
);
growthReport
.
setEndDate
(
weekLastDay
);
log
.
info
(
"保存成长报告,参数[saveGrowthReport#{}]"
,
growthReport
);
this
.
growthReportService
.
create
(
growthReport
);
}
else
{
log
.
info
(
"修改成长报告,参数[saveGrowthReport#{}]"
,
growthReport
);
this
.
growthReportService
.
updateGrowthReportData
(
growthReportDTO
.
getId
(),
growthReport
.
getData
());
}
((
UserOperationServiceImpl
)
AopContext
.
currentProxy
()).
asyncsaveGrowthReport
(
growthReport
);
return
false
;
return
ResultInfo
.
success
(
"保存成功"
)
;
}
@Override
...
...
Please
register
or
sign in
to post a comment