清除分类商品缓存
This commit is contained in:
@@ -144,4 +144,11 @@ public interface ProductService extends IService<Product> {
|
|||||||
|
|
||||||
List<ProductVO> listAndLowPrice(Long shopId, List<Long> productIds);
|
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) {
|
public List<ProductVO> listAndLowPrice(Long shopId, List<Long> productIds) {
|
||||||
return mapper.productList(shopId, 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user