清除分类商品缓存
This commit is contained in:
parent
954f2329bc
commit
6a9ef118bc
|
|
@ -144,4 +144,11 @@ public interface ProductService extends IService<Product> {
|
|||
|
||||
List<ProductVO> listAndLowPrice(Long shopId, List<Long> productIds);
|
||||
|
||||
/**
|
||||
* 清除分类商品缓存
|
||||
* @param shopId 店铺id
|
||||
* @param categoryId 商品分类id
|
||||
*/
|
||||
void cleanCategoryProduct(Long shopId, Long categoryId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -778,4 +778,10 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||
public List<ProductVO> listAndLowPrice(Long shopId, List<Long> productIds) {
|
||||
return mapper.productList(shopId, productIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanCategoryProduct(Long shopId, Long categoryId) {
|
||||
String key = ADMIN_CLIENT_PRODUCT_LIST + "::" + shopId + "::" + categoryId;
|
||||
redisService.del(key);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue