!236 fix: 优化库存扣减后清除商品缓存信息
Merge pull request !236 from OceansDeep/feature/pg
This commit is contained in:
commit
cd1f465a81
@ -431,6 +431,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
||||
LambdaUpdateWrapper<Goods> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
||||
lambdaUpdateWrapper.set(Goods::getQuantity, quantity);
|
||||
lambdaUpdateWrapper.eq(Goods::getId, goodsId);
|
||||
cache.remove(CachePrefix.GOODS.getPrefix() + goodsId);
|
||||
this.update(lambdaUpdateWrapper);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user