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
620dec6b
Commit
620dec6b
authored
Jul 22, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用方法
parent
d6bea770
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
TopicManager.java
...c/main/java/com/tanpu/community/manager/TopicManager.java
+0
-14
TopicService.java
...c/main/java/com/tanpu/community/service/TopicService.java
+0
-9
No files found.
community-service/src/main/java/com/tanpu/community/manager/TopicManager.java
View file @
620dec6b
...
@@ -91,20 +91,6 @@ public class TopicManager {
...
@@ -91,20 +91,6 @@ public class TopicManager {
}
}
public
void
modifyViewCount
(
String
topicId
,
Long
modifyMount
)
{
TopicEntity
topicEntity
=
topicService
.
queryById
(
topicId
);
if
(
topicEntity
==
null
)
{
throw
new
BizException
(
"找不到话题,id:"
+
topicId
);
}
topicService
.
modifyViewCount
(
topicId
,
modifyMount
);
if
(
modifyMount
>
0
)
{
redisService
.
incr
(
RedisKeyConstant
.
TOPIC_TOTAL_VIEW_COUNT_
+
topicId
,
modifyMount
);
}
else
{
redisService
.
decr
(
RedisKeyConstant
.
TOPIC_TOTAL_VIEW_COUNT_
+
topicId
,
-
modifyMount
);
}
}
public
void
refreshRedisCache
()
{
public
void
refreshRedisCache
()
{
List
<
TopicEntity
>
topicEntities
=
topicService
.
queryAll
();
List
<
TopicEntity
>
topicEntities
=
topicService
.
queryAll
();
...
...
community-service/src/main/java/com/tanpu/community/service/TopicService.java
View file @
620dec6b
...
@@ -93,15 +93,6 @@ public class TopicService {
...
@@ -93,15 +93,6 @@ public class TopicService {
return
topicMapper
.
selectList
(
new
LambdaQueryWrapper
<
TopicEntity
>().
in
(
TopicEntity:
:
getTopicId
,
topicIds
));
return
topicMapper
.
selectList
(
new
LambdaQueryWrapper
<
TopicEntity
>().
in
(
TopicEntity:
:
getTopicId
,
topicIds
));
}
}
public
void
modifyViewCount
(
String
topicId
,
long
Count
)
{
TopicEntity
topicEntity
=
queryById
(
topicId
);
Long
oldCount
=
topicEntity
.
getViewCntAdjust
();
topicEntity
.
setViewAmountModify
(
topicEntity
.
getViewCntAdjust
()
+
Count
);
topicMapper
.
update
(
topicEntity
,
new
LambdaUpdateWrapper
<
TopicEntity
>()
.
eq
(
TopicEntity:
:
getViewCntAdjust
,
oldCount
));
return
;
}
public
TopicEntity
queryByTitile
(
String
topicTitle
)
{
public
TopicEntity
queryByTitile
(
String
topicTitle
)
{
return
topicMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TopicEntity
>().
eq
(
TopicEntity:
:
getTopicTitle
,
topicTitle
));
return
topicMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TopicEntity
>().
eq
(
TopicEntity:
:
getTopicTitle
,
topicTitle
));
}
}
...
...
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