Commit 058adc88 authored by 刘基明's avatar 刘基明

移除theme缓存

parent fbeab784
...@@ -149,8 +149,9 @@ public class ThemeController { ...@@ -149,8 +149,9 @@ public class ThemeController {
@ApiOperation("关注主题更新数量") @ApiOperation("关注主题更新数量")
@GetMapping(value = "/test") @GetMapping(value = "/test")
@ResponseBody @ResponseBody
public CommonResp<String> test() { public CommonResp<Integer> test() {
return CommonResp.success(""); String userId = userHolder.getUserId();
return CommonResp.success(themeManager.getFollowUpdateCount(userId));
} }
} }
...@@ -2,12 +2,14 @@ package com.tanpu.community.manager; ...@@ -2,12 +2,14 @@ package com.tanpu.community.manager;
import com.tanpu.common.exception.BizException; import com.tanpu.common.exception.BizException;
import com.tanpu.common.util.JsonUtil; 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.homepage.QueryRecordThemeReq;
import com.tanpu.community.api.beans.req.theme.*; import com.tanpu.community.api.beans.req.theme.*;
import com.tanpu.community.api.beans.resp.CreateThemeResp; import com.tanpu.community.api.beans.resp.CreateThemeResp;
import com.tanpu.community.api.enums.*; 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.community.*;
import com.tanpu.community.dao.entity.user.UserInfoEntity; import com.tanpu.community.dao.entity.user.UserInfoEntity;
import com.tanpu.community.service.*; import com.tanpu.community.service.*;
...@@ -209,7 +211,7 @@ public class ThemeManager { ...@@ -209,7 +211,7 @@ public class ThemeManager {
//查询正文 //查询正文
@CacheGet(prefix = "getThemeDetail", expireSeconds = 600) // @CacheGet(prefix = "getThemeDetail", expireSeconds = 600)
public ThemeQo getDetail(String themeId, String userId) { public ThemeQo getDetail(String themeId, String userId) {
ThemeEntity themeEntity = themeService.queryByThemeId(themeId); ThemeEntity themeEntity = themeService.queryByThemeId(themeId);
if (themeEntity == null) { if (themeEntity == null) {
......
package com.tanpu.community.service; package com.tanpu.community.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.CollectionTypeEnum;
import com.tanpu.community.api.enums.DeleteTagEnum; import com.tanpu.community.api.enums.DeleteTagEnum;
import com.tanpu.community.dao.entity.community.CollectionEntity; import com.tanpu.community.dao.entity.community.CollectionEntity;
...@@ -96,7 +95,8 @@ public class CollectionService { ...@@ -96,7 +95,8 @@ public class CollectionService {
queryCollection.setUncollectionTime(LocalDateTime.now()); queryCollection.setUncollectionTime(LocalDateTime.now());
collectionMapper.updateById(queryCollection); collectionMapper.updateById(queryCollection);
} else { } else {
throw new BizException("Collection对象未找到,themeId:" + themeId + ",userId:" + userId + ",type:" + type.getCode()); // throw new BizException("Collection对象未找到,themeId:" + themeId + ",userId:" + userId + ",type:" + type.getCode());
return;
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment