商品修改 发送通知
This commit is contained in:
@@ -700,6 +700,18 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
Product old = getById(prodId);
|
||||
Long categoryId = old.getCategoryId();
|
||||
clearProductCache(categoryId);
|
||||
ThreadUtil.execAsync(() -> rabbitPublisher.sendConsInfoChangeMsg(Convert.toStr(shopId)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markProductIsAutoSoldOut(Long shopId, ProductIsAutoSaleParam param) {
|
||||
Product entity = super.getOne(query().eq(Product::getId, param.getId()).eq(Product::getShopId, shopId));
|
||||
if (entity == null) {
|
||||
throw new CzgException("商品不存在");
|
||||
}
|
||||
Product update = new Product();
|
||||
update.setIsAutoSoldStock(param.getIsAutoSoldStock());
|
||||
update(update, query().eq(Product::getId, param.getId()).eq(Product::getShopId, shopId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user