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
058adc88
Commit
058adc88
authored
Jul 20, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除theme缓存
parent
fbeab784
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
ThemeController.java
.../java/com/tanpu/community/controller/ThemeController.java
+3
-2
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+5
-3
CollectionService.java
...n/java/com/tanpu/community/service/CollectionService.java
+2
-2
No files found.
community-service/src/main/java/com/tanpu/community/controller/ThemeController.java
View file @
058adc88
...
...
@@ -149,8 +149,9 @@ public class ThemeController {
@ApiOperation
(
"关注主题更新数量"
)
@GetMapping
(
value
=
"/test"
)
@ResponseBody
public
CommonResp
<
String
>
test
()
{
return
CommonResp
.
success
(
""
);
public
CommonResp
<
Integer
>
test
()
{
String
userId
=
userHolder
.
getUserId
();
return
CommonResp
.
success
(
themeManager
.
getFollowUpdateCount
(
userId
));
}
}
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
058adc88
...
...
@@ -2,12 +2,14 @@ package com.tanpu.community.manager;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.common.util.JsonUtil
;
import
com.tanpu.community.api.beans.qo.*
;
import
com.tanpu.community.api.beans.qo.ESThemeQo
;
import
com.tanpu.community.api.beans.qo.FormerThemeQo
;
import
com.tanpu.community.api.beans.qo.ThemeContentQo
;
import
com.tanpu.community.api.beans.qo.ThemeQo
;
import
com.tanpu.community.api.beans.req.homepage.QueryRecordThemeReq
;
import
com.tanpu.community.api.beans.req.theme.*
;
import
com.tanpu.community.api.beans.resp.CreateThemeResp
;
import
com.tanpu.community.api.enums.*
;
import
com.tanpu.community.cache.CacheGet
;
import
com.tanpu.community.dao.entity.community.*
;
import
com.tanpu.community.dao.entity.user.UserInfoEntity
;
import
com.tanpu.community.service.*
;
...
...
@@ -209,7 +211,7 @@ public class ThemeManager {
//查询正文
@CacheGet
(
prefix
=
"getThemeDetail"
,
expireSeconds
=
600
)
//
@CacheGet(prefix = "getThemeDetail", expireSeconds = 600)
public
ThemeQo
getDetail
(
String
themeId
,
String
userId
)
{
ThemeEntity
themeEntity
=
themeService
.
queryByThemeId
(
themeId
);
if
(
themeEntity
==
null
)
{
...
...
community-service/src/main/java/com/tanpu/community/service/CollectionService.java
View file @
058adc88
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.community.api.enums.CollectionTypeEnum
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.dao.entity.community.CollectionEntity
;
...
...
@@ -96,7 +95,8 @@ public class CollectionService {
queryCollection
.
setUncollectionTime
(
LocalDateTime
.
now
());
collectionMapper
.
updateById
(
queryCollection
);
}
else
{
throw
new
BizException
(
"Collection对象未找到,themeId:"
+
themeId
+
",userId:"
+
userId
+
",type:"
+
type
.
getCode
());
// throw new BizException("Collection对象未找到,themeId:" + themeId + ",userId:" + userId + ",type:" + type.getCode());
return
;
}
}
}
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