Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
0f994b09
Commit
0f994b09
authored
Aug 18, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片审核 结果查询
parent
4cd6f2dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
BatchFeignCallService.java
...va/com/tanpu/community/service/BatchFeignCallService.java
+11
-9
No files found.
community-service/src/main/java/com/tanpu/community/service/BatchFeignCallService.java
View file @
0f994b09
...
...
@@ -75,7 +75,6 @@ public class BatchFeignCallService {
private
TopicService
topicService
;
public
void
getAttachDetail
(
ThemeQo
themeQo
)
{
ArrayList
<
ThemeQo
>
themeQos
=
new
ArrayList
<>();
themeQos
.
add
(
themeQo
);
...
...
@@ -192,7 +191,7 @@ public class BatchFeignCallService {
if
(!
CollectionUtils
.
isEmpty
(
shortVideoIds
))
{
// 短视频列表
List
<
ShortVideoBaseInfoResp
>
list
=
feignService
.
batchGetShortVideoBaseInfo
(
setToList
(
shortVideoIds
));
shortVideoMap
.
putAll
(
list
.
stream
().
collect
(
Collectors
.
toMap
(
ShortVideoBaseInfoResp:
:
getSourceId
,
item
->
item
,
(
oldValue
,
newValue
)->
oldValue
)));
shortVideoMap
.
putAll
(
list
.
stream
().
collect
(
Collectors
.
toMap
(
ShortVideoBaseInfoResp:
:
getSourceId
,
item
->
item
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
if
(!
CollectionUtils
.
isEmpty
(
curriculumIds
))
{
// 课程列表
...
...
@@ -200,19 +199,19 @@ public class BatchFeignCallService {
feignClientForFatools
.
getCurriculumByColumnRelId
(
setToList
(
curriculumIds
));
if
(
commonResp
!=
null
&&
!
CollectionUtils
.
isEmpty
(
commonResp
))
{
curriculumMap
.
putAll
(
commonResp
.
stream
()
.
collect
(
Collectors
.
toMap
(
ShortVideoBaseInfoResp:
:
getColumnRelId
,
item
->
item
,
(
oldValue
,
newValue
)->
oldValue
)));
.
collect
(
Collectors
.
toMap
(
ShortVideoBaseInfoResp:
:
getColumnRelId
,
item
->
item
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
}
if
(!
CollectionUtils
.
isEmpty
(
courseIds
))
{
// 新版课程列表
List
<
CourseSimpleResp
>
list
=
feignService
.
getCourseSimpleList
(
setToList
(
courseIds
));
courseMap
.
putAll
(
list
.
stream
().
collect
(
Collectors
.
toMap
(
CourseSimpleResp:
:
getCourseId
,
item
->
item
,
(
oldValue
,
newValue
)->
oldValue
)));
courseMap
.
putAll
(
list
.
stream
().
collect
(
Collectors
.
toMap
(
CourseSimpleResp:
:
getCourseId
,
item
->
item
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
if
(!
CollectionUtils
.
isEmpty
(
zhiboIds
))
{
// 直播列表
List
<
ZhiboListResp
>
list
=
feignService
.
getZhiboSimpleList
(
setToList
(
zhiboIds
));
feignClientForZhibo
.
simpleList
(
setToList
(
zhiboIds
));
zhiboMap
.
putAll
(
list
.
stream
().
collect
(
Collectors
.
toMap
(
ZhiboListResp:
:
getId
,
item
->
item
,
(
oldValue
,
newValue
)->
oldValue
)));
zhiboMap
.
putAll
(
list
.
stream
().
collect
(
Collectors
.
toMap
(
ZhiboListResp:
:
getId
,
item
->
item
,
(
oldValue
,
newValue
)
->
oldValue
)));
}
if
(!
CollectionUtils
.
isEmpty
(
imageIds
))
{
// 查询图片
...
...
@@ -428,7 +427,7 @@ public class BatchFeignCallService {
//单图封装到imglist列表中
if
(
imgUrlMap
.
containsKey
(
themeContent
.
getValue
()))
{
FileRecordEntity
imgEntity
=
imgUrlMap
.
get
(
themeContent
.
getValue
());
if
(
imgEntity
!=
null
&&
!
StringUtils
.
isEmpty
(
imgEntity
.
getExtInfo
()))
{
if
(
imgEntity
!=
null
&&
!
StringUtils
.
isEmpty
(
imgEntity
.
getExtInfo
()))
{
Map
<
String
,
Object
>
extMap
=
JsonUtil
.
toMap
(
imgEntity
.
getExtInfo
());
ImagesDTO
imagesDTO
=
ImagesDTO
.
builder
().
imgHeight
((
Integer
)
extMap
.
get
(
"height"
))
.
imgWidth
((
Integer
)
extMap
.
get
(
"width"
))
...
...
@@ -444,10 +443,13 @@ public class BatchFeignCallService {
//多图写入图片宽高,压缩图片url
List
<
ImagesDTO
>
imgList
=
themeContent
.
getImgList
();
for
(
ImagesDTO
imagesDTO
:
imgList
)
{
//压缩图片地址
imagesDTO
.
setResizeUrl
(
imagesDTO
.
getRemark
()
+
CommunityConstant
.
OSS_RESIZE_RATIO
);
if
(
imgUrlMap
.
containsKey
(
imagesDTO
.
getRelId
()))
{
FileRecordEntity
imgEntity
=
imgUrlMap
.
get
(
imagesDTO
.
getRelId
());
// 处理屏蔽图片
imagesDTO
.
setRemark
(
imgEntity
.
getUrl
());
//压缩图片地址
imagesDTO
.
setResizeUrl
(
imgEntity
.
getUrl
()
+
CommunityConstant
.
OSS_RESIZE_RATIO
);
String
extInfo
=
imgEntity
.
getExtInfo
();
if
(!
StringUtils
.
isEmpty
(
extInfo
))
{
Map
<
String
,
Object
>
extMap
=
JsonUtil
.
toMap
(
extInfo
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment