Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
段启岩
beyond-clouds
Commits
563b384c
Commit
563b384c
authored
Feb 07, 2020
by
段启岩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复不会删除旧引用数量的问题
parent
0a52c239
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/main/java/cn/meteor/beyondclouds/modules/blog/service/impl/BlogServiceImpl.java
+2
-2
src/main/java/cn/meteor/beyondclouds/modules/question/service/impl/QuestionServiceImpl.java
+2
-2
No files found.
src/main/java/cn/meteor/beyondclouds/modules/blog/service/impl/BlogServiceImpl.java
View file @
563b384c
...
...
@@ -368,7 +368,7 @@ public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements IB
List
<
String
>
referencedTopicIds
=
topicReferenceService
.
list
(
topicReferenceQueryWrapper
).
stream
()
.
map
(
TopicReference:
:
getTopicId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
referencedTopicIds
))
{
if
(
!
CollectionUtils
.
isEmpty
(
referencedTopicIds
))
{
// 减少话题引用测试
topicService
.
decreaseReferenceCountBatch
(
referencedTopicIds
,
1
);
}
...
...
@@ -405,7 +405,7 @@ public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements IB
List
<
String
>
referencedTagIds
=
blogTagService
.
list
(
blogTagQueryWrapper
).
stream
()
.
map
(
BlogTag:
:
getTagId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
referencedTagIds
))
{
if
(
!
CollectionUtils
.
isEmpty
(
referencedTagIds
))
{
// 减少标签引用次数
tagService
.
decreaseReferenceCountBatch
(
referencedTagIds
,
1
);
}
...
...
src/main/java/cn/meteor/beyondclouds/modules/question/service/impl/QuestionServiceImpl.java
View file @
563b384c
...
...
@@ -331,7 +331,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
List
<
String
>
referencedTopicIds
=
topicReferenceService
.
list
(
topicReferenceQueryWrapper
).
stream
()
.
map
(
TopicReference:
:
getTopicId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
referencedTopicIds
))
{
if
(
!
CollectionUtils
.
isEmpty
(
referencedTopicIds
))
{
// 减少话题引用数量
topicService
.
decreaseReferenceCountBatch
(
referencedTopicIds
,
1
);
}
...
...
@@ -369,7 +369,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
List
<
String
>
referencedTagIds
=
questionTagService
.
list
(
questionTagQueryWrapper
).
stream
()
.
map
(
QuestionTag:
:
getTagId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
referencedTagIds
))
{
if
(
!
CollectionUtils
.
isEmpty
(
referencedTagIds
))
{
// 减少标签引用数量
tagService
.
decreaseReferenceCountBatch
(
referencedTagIds
,
1
);
}
...
...
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