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
74e78a6a
Commit
74e78a6a
authored
Feb 24, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
npe fix
parent
aafc72e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
TopicService.java
...c/main/java/com/tanpu/community/service/TopicService.java
+24
-15
No files found.
community-service/src/main/java/com/tanpu/community/service/TopicService.java
View file @
74e78a6a
...
...
@@ -240,34 +240,43 @@ public class TopicService {
}
else
{
fund
=
Arrays
.
asList
(
new
ProductInfoVO
());
}
if
(
CollectionUtils
.
isNotEmpty
(
fund
))
{
TopicAttachment
attach
=
TopicAttachment
.
builder
().
type
(
RelTypeEnum
.
FUND
.
type
)
.
subType
(
String
.
valueOf
(
entity
.
getSubjectSubType
()))
.
detail
(
TopicAttachmentDetail
.
builder
().
fund
(
fund
.
get
(
0
)).
build
()).
build
();
attachements
.
add
(
attach
);
}
}
else
if
(
RelTypeEnum
.
FUND_COMPANY
.
type
.
equals
(
entity
.
getSubjectType
().
toString
()))
{
// 资管人
List
<
FundCompanyVO
>
fundCompany
=
feignService
.
getFundCompany
(
Collections
.
singletonList
(
entity
.
getSubjectId
()));
if
(
CollectionUtils
.
isNotEmpty
(
fundCompany
))
{
FundCompanyVO
company
=
fundCompany
.
get
(
0
);
company
.
setType
(
String
.
valueOf
(
entity
.
getSubjectSubType
()));
// 公司类型
TopicAttachment
attach
=
TopicAttachment
.
builder
().
type
(
RelTypeEnum
.
FUND_COMPANY
.
type
)
.
detail
(
TopicAttachmentDetail
.
builder
().
fundCompany
(
company
).
build
()).
build
();
attachements
.
add
(
attach
);
}
}
else
if
(
RelTypeEnum
.
NEW_COURSE_WARE
.
type
.
equals
(
entity
.
getSubjectType
().
toString
()))
{
// 课程包
List
<
CoursePackageSimpleResp
>
coursePackage
=
feignService
.
getCoursePackageList
(
Collections
.
singletonList
(
entity
.
getSubjectId
()));
if
(
CollectionUtils
.
isNotEmpty
(
coursePackage
)){
TopicAttachment
attach
=
TopicAttachment
.
builder
().
type
(
RelTypeEnum
.
NEW_COURSE_WARE
.
type
)
.
detail
(
TopicAttachmentDetail
.
builder
().
coursePackage
(
coursePackage
.
get
(
0
)).
build
()).
build
();
attachements
.
add
(
attach
);
}
}
else
if
(
RelTypeEnum
.
OFFLINE_ACTIVITY
.
type
.
equals
(
entity
.
getSubjectType
().
toString
()))
{
// 线下活动
List
<
OfflineActivitySimpleResp
>
activitySimpleList
=
feignService
.
getActivitySimpleList
(
Collections
.
singletonList
(
entity
.
getSubjectId
()));
if
(
CollectionUtils
.
isNotEmpty
(
activitySimpleList
)){
TopicAttachmentDetail
detailVo
=
TopicAttachmentDetail
.
builder
().
activity
(
activitySimpleList
.
get
(
0
)).
build
();
TopicAttachment
attach
=
TopicAttachment
.
builder
().
type
(
RelTypeEnum
.
OFFLINE_ACTIVITY
.
type
).
detail
(
detailVo
).
build
();
attachements
.
add
(
attach
);
}
}
}
topic
.
setAttachments
(
attachements
);
...
...
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