Authored by 张帅

Merge branch 'dev-6.9.4-grassupload' into test6.9.3

... ... @@ -251,7 +251,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
private void updateArticleImageSize(int articleId){
taskExecutor.submit(() -> {
updateImageSize(articleId);
clearArticleBlockCache(articleId);
});
}
... ... @@ -513,6 +513,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
grassArticleLabel.setAuthStatus(authStatus);//审核状态
grassArticleLabelDao.updateByPrimaryKeySelective(grassArticleLabel);
logger.info("updateArticle changeAuthStatus success! req={}",req);
clearArticleNewCache(req.getArticleId());
}
//定时发布
... ... @@ -1359,4 +1360,20 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
cacheReq.setElementId(String.valueOf(articleId));
grassRefreshCacheService.refreshGrassCache(cacheReq);
}
private void clearArticleNewCache(Integer articleId){
logger.info("clearArticleNewCache, type=1002");
GrassCacheReq cacheReq = new GrassCacheReq();
cacheReq.setClearCode(1004);
cacheReq.setElementId(String.valueOf(articleId));
grassRefreshCacheService.refreshGrassCache(cacheReq);
}
private void clearArticleBlockCache(Integer articleId){
logger.info("clearArticleListCache, type=1001");
GrassCacheReq cacheReq = new GrassCacheReq();
cacheReq.setClearCode(1003);
cacheReq.setElementId(String.valueOf(articleId));
grassRefreshCacheService.refreshGrassCache(cacheReq);
}
}
... ...