Merge branch 'dev-6.9.4-grassupload' into test6.9.3
Showing
1 changed file
with
18 additions
and
1 deletions
@@ -251,7 +251,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ | @@ -251,7 +251,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ | ||
251 | private void updateArticleImageSize(int articleId){ | 251 | private void updateArticleImageSize(int articleId){ |
252 | taskExecutor.submit(() -> { | 252 | taskExecutor.submit(() -> { |
253 | updateImageSize(articleId); | 253 | updateImageSize(articleId); |
254 | - | 254 | + clearArticleBlockCache(articleId); |
255 | }); | 255 | }); |
256 | } | 256 | } |
257 | 257 | ||
@@ -513,6 +513,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ | @@ -513,6 +513,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ | ||
513 | grassArticleLabel.setAuthStatus(authStatus);//审核状态 | 513 | grassArticleLabel.setAuthStatus(authStatus);//审核状态 |
514 | grassArticleLabelDao.updateByPrimaryKeySelective(grassArticleLabel); | 514 | grassArticleLabelDao.updateByPrimaryKeySelective(grassArticleLabel); |
515 | logger.info("updateArticle changeAuthStatus success! req={}",req); | 515 | logger.info("updateArticle changeAuthStatus success! req={}",req); |
516 | + clearArticleNewCache(req.getArticleId()); | ||
516 | } | 517 | } |
517 | 518 | ||
518 | //定时发布 | 519 | //定时发布 |
@@ -1359,4 +1360,20 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ | @@ -1359,4 +1360,20 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ | ||
1359 | cacheReq.setElementId(String.valueOf(articleId)); | 1360 | cacheReq.setElementId(String.valueOf(articleId)); |
1360 | grassRefreshCacheService.refreshGrassCache(cacheReq); | 1361 | grassRefreshCacheService.refreshGrassCache(cacheReq); |
1361 | } | 1362 | } |
1363 | + | ||
1364 | + private void clearArticleNewCache(Integer articleId){ | ||
1365 | + logger.info("clearArticleNewCache, type=1002"); | ||
1366 | + GrassCacheReq cacheReq = new GrassCacheReq(); | ||
1367 | + cacheReq.setClearCode(1004); | ||
1368 | + cacheReq.setElementId(String.valueOf(articleId)); | ||
1369 | + grassRefreshCacheService.refreshGrassCache(cacheReq); | ||
1370 | + } | ||
1371 | + | ||
1372 | + private void clearArticleBlockCache(Integer articleId){ | ||
1373 | + logger.info("clearArticleListCache, type=1001"); | ||
1374 | + GrassCacheReq cacheReq = new GrassCacheReq(); | ||
1375 | + cacheReq.setClearCode(1003); | ||
1376 | + cacheReq.setElementId(String.valueOf(articleId)); | ||
1377 | + grassRefreshCacheService.refreshGrassCache(cacheReq); | ||
1378 | + } | ||
1362 | } | 1379 | } |
-
Please register or login to post a comment