Showing
1 changed file
with
16 additions
and
1 deletions
@@ -8,12 +8,15 @@ import com.yohobuy.platform.dal.cms.model.GrassFindGoods; | @@ -8,12 +8,15 @@ import com.yohobuy.platform.dal.cms.model.GrassFindGoods; | ||
8 | import com.yohobuy.platform.dal.cms.req.GrassFindgoodsReq; | 8 | import com.yohobuy.platform.dal.cms.req.GrassFindgoodsReq; |
9 | import com.yohobuy.platform.dal.grass.IGrassArticleDao; | 9 | import com.yohobuy.platform.dal.grass.IGrassArticleDao; |
10 | import com.yohobuy.platform.grass.service.IGrassArticleService; | 10 | import com.yohobuy.platform.grass.service.IGrassArticleService; |
11 | +import com.yohobuy.platform.grass.service.IGrassRefreshCacheService; | ||
11 | import com.yohobuy.platform.model.cms.response.GrassFindgoodsRspBO; | 12 | import com.yohobuy.platform.model.cms.response.GrassFindgoodsRspBO; |
12 | import com.yohobuy.platform.model.common.PageResponseVO; | 13 | import com.yohobuy.platform.model.common.PageResponseVO; |
14 | +import com.yohobuy.platform.model.grass.request.GrassCacheReq; | ||
13 | import org.apache.commons.collections.CollectionUtils; | 15 | import org.apache.commons.collections.CollectionUtils; |
14 | import org.apache.commons.lang3.StringUtils; | 16 | import org.apache.commons.lang3.StringUtils; |
15 | import org.slf4j.Logger; | 17 | import org.slf4j.Logger; |
16 | import org.slf4j.LoggerFactory; | 18 | import org.slf4j.LoggerFactory; |
19 | +import org.springframework.beans.factory.annotation.Autowired; | ||
17 | import org.springframework.stereotype.Component; | 20 | import org.springframework.stereotype.Component; |
18 | 21 | ||
19 | import javax.annotation.Resource; | 22 | import javax.annotation.Resource; |
@@ -36,6 +39,9 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | @@ -36,6 +39,9 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | ||
36 | @Resource | 39 | @Resource |
37 | IGrassArticleDao grassArticleDao; | 40 | IGrassArticleDao grassArticleDao; |
38 | 41 | ||
42 | + @Autowired | ||
43 | + private IGrassRefreshCacheService grassRefreshCacheService; | ||
44 | + | ||
39 | 45 | ||
40 | @Override | 46 | @Override |
41 | public PageResponseVO<GrassFindgoodsRspBO> getGrassFindgoodsList(GrassFindgoodsReq req) { | 47 | public PageResponseVO<GrassFindgoodsRspBO> getGrassFindgoodsList(GrassFindgoodsReq req) { |
@@ -92,7 +98,11 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | @@ -92,7 +98,11 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | ||
92 | if(findGoods != null){ | 98 | if(findGoods != null){ |
93 | grassFindGoodsDAO.deleteById(id); | 99 | grassFindGoodsDAO.deleteById(id); |
94 | grassArticleDao.updateMarkFlag(findGoods.getArticleId(),null,null,0); | 100 | grassArticleDao.updateMarkFlag(findGoods.getArticleId(),null,null,0); |
95 | - grassArticleDao.selectByPrimaryKey(findGoods.getArticleId()); | 101 | + //清除发现好物列表缓存 |
102 | + logger.info("clear findgoodlist, type=1008"); | ||
103 | + GrassCacheReq cacheReq = new GrassCacheReq(); | ||
104 | + cacheReq.setClearCode(1008); | ||
105 | + grassRefreshCacheService.refreshGrassCache(cacheReq); | ||
96 | } | 106 | } |
97 | 107 | ||
98 | } | 108 | } |
@@ -103,5 +113,10 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | @@ -103,5 +113,10 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | ||
103 | return; | 113 | return; |
104 | } | 114 | } |
105 | grassFindGoodsDAO.updateOrderBy(id,orderBy); | 115 | grassFindGoodsDAO.updateOrderBy(id,orderBy); |
116 | + //清除发现好物列表缓存 | ||
117 | + logger.info("clear findgoodlist, type=1008"); | ||
118 | + GrassCacheReq cacheReq = new GrassCacheReq(); | ||
119 | + cacheReq.setClearCode(1008); | ||
120 | + grassRefreshCacheService.refreshGrassCache(cacheReq); | ||
106 | } | 121 | } |
107 | } | 122 | } |
-
Please register or login to post a comment