Authored by mali

求购清理详情页缓存

... ... @@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.GoodsSize;
import com.yohoufo.common.alarm.EventBusPublisher;
import com.yohobuy.ufo.model.order.common.BidSkupStatus;
import com.yohobuy.ufo.model.response.BidStoragePriceResp;
import com.yohoufo.common.cache.ControllerCacheAop;
import com.yohoufo.dal.product.BidStoragePriceMapper;
import com.yohoufo.dal.product.ProductMapper;
import com.yohoufo.dal.product.model.BidStoragePrice;
... ... @@ -15,6 +16,7 @@ import com.yohoufo.dal.product.model.Product;
import com.yohoufo.dal.product.model.StoragePrice;
import com.yohoufo.product.cache.UfoProductCacheKeyEnum;
import com.yohoufo.product.cache.UfoProductCacheService;
import com.yohoufo.product.controller.ProductController;
import com.yohoufo.product.event.BidStoragePriceUpdateEvent;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
... ... @@ -47,6 +49,9 @@ public class BidProductService {
@Autowired
private StoragePriceService storagePriceService;
@Autowired
private ControllerCacheAop cacheAop;
/**
* create new bid skup
... ... @@ -261,6 +266,12 @@ public class BidProductService {
BidStoragePriceUpdateEvent bidStoragePriceUpdateEvent = new BidStoragePriceUpdateEvent(this::reSetBidStoragePriceCache);
bidStoragePriceUpdateEvent.setProductId(productId);
EventBusPublisher.publishEvent(bidStoragePriceUpdateEvent);
try {
cacheAop.clearCache(ProductController.class.getMethod("queryProductDetailTabsById", new Class[]{Integer.class, String.class}), new Object[]{productId, null});
} catch (NoSuchMethodException e) {
logger.info("method clearCache queryProductDetailTabsById wrong in productId is 【{}】", productId);
}
}
public void publishBidPriceUpdateEventEx(Integer skup) {
... ...