Commit 28fdcf4e by 吴博

Merge branch 'hotfix/1007522' into 'release'

hotfix: [1007522] 修复斗罗高清大图解锁状态及第三方资源删除时同步清除缓存

See merge request rays/pcloud-book!1624
parents 25a50c34 b85ba5e5
......@@ -3,8 +3,10 @@ package com.pcloud.book.book.constant;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.pcloud.common.constant.CacheConstant;
import com.pcloud.common.utils.DateUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -486,4 +488,5 @@ public class BookConstant {
public static final String PAGE_ID_TEMP_CODE_CACHE = CacheConstant.BOOK + "TEMPCODE";
public static final String PAGE_ID_CODE_CACHE = CacheConstant.BOOK + "PAGECODE";
public static final String PAGE_ID_LOGOURL_CACHE = CacheConstant.BOOK + "LOGOURL";
}
......@@ -14,6 +14,7 @@ import com.pcloud.book.applet.dto.AppletChartDateDTO;
import com.pcloud.book.applet.dto.AppletThirdResourcesDTO;
import com.pcloud.book.applet.dto.PvuvDTO;
import com.pcloud.book.book.biz.BookBiz;
import com.pcloud.book.book.constant.BookConstant;
import com.pcloud.book.book.dto.BookDto;
import com.pcloud.book.consumer.channel.QrcodeSceneConsr;
import com.pcloud.book.consumer.common.ExportConsr;
......@@ -243,6 +244,9 @@ public class AppletThirdResourcesBizImpl implements AppletThirdResourcesBiz {
@Override
public void deleteAppletsById(Long id) {
thirdResourcesDao.deleteById(id);
//删除资源时同步删除缓存
JedisClusterUtils.del(AppletConstants.H5_THIRD_RESOURCE_REDIS + DateUtils.formatDate(DateUtils.addDay(new Date(), -7), DateUtils.DATE_FORMAT_DATEONLY));
}
@Override
......@@ -283,6 +287,9 @@ public class AppletThirdResourcesBizImpl implements AppletThirdResourcesBiz {
addPicResources(thirdResourcesDTO.getId(), thirdResourcesDTO.getPicUrlList());
}
this.updateResourceApply(thirdResources.getId(), thirdResourcesDTO.getCrowdTypeList(), thirdResourcesDTO.getContentTypeList());
// 更新第三方资源时删除缓存
JedisClusterUtils.del(AppletConstants.H5_THIRD_RESOURCE_REDIS + DateUtils.formatDate(DateUtils.addDay(new Date(), -7), DateUtils.DATE_FORMAT_DATEONLY));
}
/**
......
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