增加商品库存redis缓存 & 库存变动发送rabbit消息

This commit is contained in:
Tankaikai 2025-04-16 17:41:31 +08:00
parent 777b3051fa
commit 8ab758fac9
1 changed files with 2 additions and 0 deletions

View File

@ -411,6 +411,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
if (!old.getCategoryId().equals(dto.getCategoryId())) { if (!old.getCategoryId().equals(dto.getCategoryId())) {
// 清除旧分类缓存&新分类缓存 // 清除旧分类缓存&新分类缓存
clearProductCache(old.getCategoryId(), entity.getCategoryId()); clearProductCache(old.getCategoryId(), entity.getCategoryId());
}else {
clearProductCache(entity.getCategoryId());
} }
List<ProdSkuDTO> skuList = dto.getSkuList(); List<ProdSkuDTO> skuList = dto.getSkuList();
// 商品SKU-ID列表 // 商品SKU-ID列表