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
b75a6026
Commit
b75a6026
authored
Jul 13, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新课程Feign接口
parent
bf9dc5b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
29 deletions
+37
-29
ProductService.java
...main/java/com/tanpu/community/service/ProductService.java
+36
-29
ConvertUtil.java
...e/src/main/java/com/tanpu/community/util/ConvertUtil.java
+1
-0
No files found.
community-service/src/main/java/com/tanpu/community/service/ProductService.java
View file @
b75a6026
...
@@ -66,7 +66,7 @@ public class ProductService {
...
@@ -66,7 +66,7 @@ public class ProductService {
private
TopicService
topicService
;
private
TopicService
topicService
;
public
void
transferAttachement
(
ThemeQo
themeQo
){
public
void
transferAttachement
(
ThemeQo
themeQo
)
{
ArrayList
<
ThemeQo
>
themeQos
=
new
ArrayList
<>();
ArrayList
<
ThemeQo
>
themeQos
=
new
ArrayList
<>();
themeQos
.
add
(
themeQo
);
themeQos
.
add
(
themeQo
);
transferAttachments
(
themeQos
);
transferAttachments
(
themeQos
);
...
@@ -137,39 +137,43 @@ public class ProductService {
...
@@ -137,39 +137,43 @@ public class ProductService {
List
<
String
>
topicIds
=
Lists
.
newArrayList
();
List
<
String
>
topicIds
=
Lists
.
newArrayList
();
// 获取关联资源id
// 获取关联资源id
if
(
themeQos
!=
null
)
{
if
(
themeQos
!=
null
)
{
themeQos
.
stream
().
forEach
(
o
->
o
.
getContent
().
stream
().
forEach
(
c
->
{
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
LIVE
.
type
))
{
zhiboIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
SHORT_VIDEO
.
type
))
{
shortVideoIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
FUND
.
type
))
{
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
PUBLIC
.
type
)
{
publicFundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
PRIVATE
.
type
)
{
fundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
TAMP
.
type
)
{
tanpuFundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
CUSTOMER_IMPORT
.
type
)
{
ifaFundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
NOT_NET_PRODUCT
.
type
)
{
notNetFundIds
.
add
(
c
.
getValue
());
}
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
VIDEO
.
type
)
||
c
.
getType
().
equals
(
RelTypeEnum
.
AUDIO
.
type
))
{
curriculumIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
SINGLE_IMG
.
type
))
{
imageIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
NEW_COURSE_SECTION_AUDIO
.
type
)
||
c
.
getType
().
equals
(
RelTypeEnum
.
NEW_COURSE_SECTION_VIDEO
.
type
))
{
courseIds
.
add
(
c
.
getValue
());
}
}));
themeQos
.
stream
().
forEach
(
o
->
{
themeQos
.
stream
().
forEach
(
o
->
{
if
(
o
.
getTopicId
()
!=
null
)
{
if
(
o
.
getTopicId
()
!=
null
)
{
topicIds
.
add
(
o
.
getTopicId
());
topicIds
.
add
(
o
.
getTopicId
());
}
}
});
});
themeQos
.
stream
().
forEach
(
o
->
{
if
(
o
.
getContent
()
!=
null
)
{
o
.
getContent
().
stream
().
forEach
(
c
->
{
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
LIVE
.
type
))
{
zhiboIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
SHORT_VIDEO
.
type
))
{
shortVideoIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
FUND
.
type
))
{
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
PUBLIC
.
type
)
{
publicFundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
PRIVATE
.
type
)
{
fundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
TAMP
.
type
)
{
tanpuFundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
CUSTOMER_IMPORT
.
type
)
{
ifaFundIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getProductType
()
==
ProductTypeEnum
.
NOT_NET_PRODUCT
.
type
)
{
notNetFundIds
.
add
(
c
.
getValue
());
}
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
VIDEO
.
type
)
||
c
.
getType
().
equals
(
RelTypeEnum
.
AUDIO
.
type
))
{
curriculumIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
SINGLE_IMG
.
type
))
{
imageIds
.
add
(
c
.
getValue
());
}
else
if
(
c
.
getType
().
equals
(
RelTypeEnum
.
NEW_COURSE_SECTION_AUDIO
.
type
)
||
c
.
getType
().
equals
(
RelTypeEnum
.
NEW_COURSE_SECTION_VIDEO
.
type
))
{
courseIds
.
add
(
c
.
getValue
());
}
});
}
});
}
}
if
(!
CollectionUtils
.
isEmpty
(
shortVideoIds
))
{
if
(!
CollectionUtils
.
isEmpty
(
shortVideoIds
))
{
// 短视频列表
// 短视频列表
...
@@ -339,6 +343,9 @@ public class ProductService {
...
@@ -339,6 +343,9 @@ public class ProductService {
if
(!
StringUtils
.
isEmpty
(
themeQo
.
getTopicId
())
&&
topicMap
.
containsKey
(
themeQo
.
getTopicId
()))
{
if
(!
StringUtils
.
isEmpty
(
themeQo
.
getTopicId
())
&&
topicMap
.
containsKey
(
themeQo
.
getTopicId
()))
{
themeQo
.
setTopicTitle
(
topicMap
.
get
(
themeQo
.
getTopicId
()));
themeQo
.
setTopicTitle
(
topicMap
.
get
(
themeQo
.
getTopicId
()));
}
}
if
(
themeQo
.
getContent
()==
null
){
continue
;
}
for
(
ThemeContentQo
themeContent
:
themeQo
.
getContent
())
{
for
(
ThemeContentQo
themeContent
:
themeQo
.
getContent
())
{
if
(
themeContent
.
getType
().
equals
(
RelTypeEnum
.
LIVE
.
type
))
{
if
(
themeContent
.
getType
().
equals
(
RelTypeEnum
.
LIVE
.
type
))
{
if
(
zhiboMap
.
containsKey
(
themeContent
.
getValue
()))
{
if
(
zhiboMap
.
containsKey
(
themeContent
.
getValue
()))
{
...
...
community-service/src/main/java/com/tanpu/community/util/ConvertUtil.java
View file @
b75a6026
...
@@ -25,6 +25,7 @@ public class ConvertUtil {
...
@@ -25,6 +25,7 @@ public class ConvertUtil {
ThemeQo
themeQO
=
new
ThemeQo
();
ThemeQo
themeQO
=
new
ThemeQo
();
BeanUtils
.
copyProperties
(
themeEntity
,
themeQO
);
BeanUtils
.
copyProperties
(
themeEntity
,
themeQO
);
List
<
ThemeContentQo
>
themeContentQos
=
JsonUtil
.
toBean
(
themeEntity
.
getContent
(),
new
TypeReference
<
List
<
ThemeContentQo
>>()
{});
List
<
ThemeContentQo
>
themeContentQos
=
JsonUtil
.
toBean
(
themeEntity
.
getContent
(),
new
TypeReference
<
List
<
ThemeContentQo
>>()
{});
themeQO
.
setContent
(
themeContentQos
);
return
themeQO
;
return
themeQO
;
}
}
...
...
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