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
e054820f
Commit
e054820f
authored
Feb 23, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
讨论区置顶
parent
c15de613
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
ThemeQo.java
...c/main/java/com/tanpu/community/api/beans/qo/ThemeQo.java
+3
-0
BatchFeignCallService.java
...va/com/tanpu/community/service/BatchFeignCallService.java
+7
-5
ThemeEntityMapper.xml
...src/main/resources/mapper/community/ThemeEntityMapper.xml
+2
-1
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/ThemeQo.java
View file @
e054820f
...
...
@@ -45,6 +45,9 @@ public class ThemeQo implements Serializable {
@ApiModelProperty
(
value
=
"话题名称"
)
public
String
topicTitle
;
@ApiModelProperty
(
value
=
"话题是否需要权限"
)
public
Integer
topicSpecialPermission
;
@ApiModelProperty
(
value
=
"昵称"
)
public
String
nickName
;
...
...
community-service/src/main/java/com/tanpu/community/service/BatchFeignCallService.java
View file @
e054820f
...
...
@@ -105,7 +105,7 @@ public class BatchFeignCallService {
// 图片信息
Map
<
String
,
FileRecordEntity
>
imgMap
=
Maps
.
newHashMap
();
// 话题标题
Map
<
String
,
String
>
topicMap
=
Maps
.
newHashMap
();
Map
<
String
,
TopicEntity
>
topicMap
=
Maps
.
newHashMap
();
// 图片信息
Map
<
String
,
UserInfoResp
>
userMap
=
Maps
.
newHashMap
();
// 批量查询资源信息,将不同类型的id抽取,并通过ids查询并存放到id-对象Map中
...
...
@@ -131,7 +131,7 @@ public class BatchFeignCallService {
Map
<
String
,
ZhiboListResp
>
zhiboMap
,
Map
<
String
,
FundInfoBaseResp
>
fundMap
,
Map
<
String
,
OfflineActivitySimpleResp
>
activityMap
,
Map
<
String
,
FileRecordEntity
>
imgMap
,
Map
<
String
,
String
>
topicMap
,
Map
<
String
,
TopicEntity
>
topicMap
,
Map
<
String
,
UserInfoResp
>
userMap
,
List
<
ThemeQo
>
themeQos
)
{
...
...
@@ -249,7 +249,7 @@ public class BatchFeignCallService {
topicService
.
queryByIds
(
setToList
(
topicIds
));
if
(!
CollectionUtils
.
isEmpty
(
topicEntities
))
{
topicMap
.
putAll
(
topicEntities
.
stream
().
collect
(
Collectors
.
toMap
(
TopicEntity:
:
getTopicId
,
TopicEntity:
:
getTopicTitle
)));
.
toMap
(
TopicEntity:
:
getTopicId
,
o
->
o
)));
}
}
if
(!
CollectionUtils
.
isEmpty
(
userIds
))
{
...
...
@@ -376,11 +376,13 @@ public class BatchFeignCallService {
Map
<
String
,
FundInfoBaseResp
>
fundMap
,
Map
<
String
,
OfflineActivitySimpleResp
>
activityMap
,
Map
<
String
,
FileRecordEntity
>
imgUrlMap
,
Map
<
String
,
UserInfoResp
>
userMap
,
Map
<
String
,
String
>
topicMap
)
{
Map
<
String
,
TopicEntity
>
topicMap
)
{
for
(
ThemeQo
themeQo
:
themeQos
)
{
if
(!
StringUtils
.
isEmpty
(
themeQo
.
getTopicId
())
&&
topicMap
.
containsKey
(
themeQo
.
getTopicId
()))
{
//话题标题
themeQo
.
setTopicTitle
(
topicMap
.
get
(
themeQo
.
getTopicId
()));
TopicEntity
topicEntity
=
topicMap
.
get
(
themeQo
.
getTopicId
());
themeQo
.
setTopicTitle
(
topicEntity
.
getTopicTitle
());
themeQo
.
setTopicSpecialPermission
(
topicEntity
.
getSpecialPermission
());
}
if
(!
StringUtils
.
isEmpty
(
themeQo
.
getAuthorId
())
&&
userMap
.
containsKey
(
themeQo
.
getAuthorId
()))
{
//用户信息
...
...
community-service/src/main/resources/mapper/community/ThemeEntityMapper.xml
View file @
e054820f
...
...
@@ -78,7 +78,8 @@
and topic_id="") or topic_id in
<foreach
item=
"item"
index=
"index"
collection=
"topicIdCollection"
open=
"("
separator=
","
close=
")"
>
#{item}
) limit #{pageStart}, #{pageSize}
#{item}
</foreach>
) limit #{pageStart}, #{pageSize}
</select>
</mapper>
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