Merge branch 'hotfix_data_cache' into test6.9.14
Showing
1 changed file
with
11 additions
and
0 deletions
@@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.GoodsSize; | @@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.GoodsSize; | ||
8 | import com.yohoufo.common.alarm.EventBusPublisher; | 8 | import com.yohoufo.common.alarm.EventBusPublisher; |
9 | import com.yohobuy.ufo.model.order.common.BidSkupStatus; | 9 | import com.yohobuy.ufo.model.order.common.BidSkupStatus; |
10 | import com.yohobuy.ufo.model.response.BidStoragePriceResp; | 10 | import com.yohobuy.ufo.model.response.BidStoragePriceResp; |
11 | +import com.yohoufo.common.cache.ControllerCacheAop; | ||
11 | import com.yohoufo.dal.product.BidStoragePriceMapper; | 12 | import com.yohoufo.dal.product.BidStoragePriceMapper; |
12 | import com.yohoufo.dal.product.ProductMapper; | 13 | import com.yohoufo.dal.product.ProductMapper; |
13 | import com.yohoufo.dal.product.model.BidStoragePrice; | 14 | import com.yohoufo.dal.product.model.BidStoragePrice; |
@@ -15,6 +16,7 @@ import com.yohoufo.dal.product.model.Product; | @@ -15,6 +16,7 @@ import com.yohoufo.dal.product.model.Product; | ||
15 | import com.yohoufo.dal.product.model.StoragePrice; | 16 | import com.yohoufo.dal.product.model.StoragePrice; |
16 | import com.yohoufo.product.cache.UfoProductCacheKeyEnum; | 17 | import com.yohoufo.product.cache.UfoProductCacheKeyEnum; |
17 | import com.yohoufo.product.cache.UfoProductCacheService; | 18 | import com.yohoufo.product.cache.UfoProductCacheService; |
19 | +import com.yohoufo.product.controller.ProductController; | ||
18 | import com.yohoufo.product.event.BidStoragePriceUpdateEvent; | 20 | import com.yohoufo.product.event.BidStoragePriceUpdateEvent; |
19 | import org.apache.commons.collections.CollectionUtils; | 21 | import org.apache.commons.collections.CollectionUtils; |
20 | import org.slf4j.Logger; | 22 | import org.slf4j.Logger; |
@@ -47,6 +49,9 @@ public class BidProductService { | @@ -47,6 +49,9 @@ public class BidProductService { | ||
47 | @Autowired | 49 | @Autowired |
48 | private StoragePriceService storagePriceService; | 50 | private StoragePriceService storagePriceService; |
49 | 51 | ||
52 | + @Autowired | ||
53 | + private ControllerCacheAop cacheAop; | ||
54 | + | ||
50 | 55 | ||
51 | /** | 56 | /** |
52 | * create new bid skup | 57 | * create new bid skup |
@@ -261,6 +266,12 @@ public class BidProductService { | @@ -261,6 +266,12 @@ public class BidProductService { | ||
261 | BidStoragePriceUpdateEvent bidStoragePriceUpdateEvent = new BidStoragePriceUpdateEvent(this::reSetBidStoragePriceCache); | 266 | BidStoragePriceUpdateEvent bidStoragePriceUpdateEvent = new BidStoragePriceUpdateEvent(this::reSetBidStoragePriceCache); |
262 | bidStoragePriceUpdateEvent.setProductId(productId); | 267 | bidStoragePriceUpdateEvent.setProductId(productId); |
263 | EventBusPublisher.publishEvent(bidStoragePriceUpdateEvent); | 268 | EventBusPublisher.publishEvent(bidStoragePriceUpdateEvent); |
269 | + | ||
270 | + try { | ||
271 | + cacheAop.clearCache(ProductController.class.getMethod("queryProductDetailTabsById", new Class[]{Integer.class, String.class}), new Object[]{productId, null}); | ||
272 | + } catch (NoSuchMethodException e) { | ||
273 | + logger.info("method clearCache queryProductDetailTabsById wrong in productId is 【{}】", productId); | ||
274 | + } | ||
264 | } | 275 | } |
265 | 276 | ||
266 | public void publishBidPriceUpdateEventEx(Integer skup) { | 277 | public void publishBidPriceUpdateEventEx(Integer skup) { |
-
Please register or login to post a comment