积分兑换,结算页面积分支付展示问题处理。
店铺商品变更店铺商品数量展示同步。
This commit is contained in:
@@ -107,10 +107,12 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
break;
|
||||
//审核商品
|
||||
case GOODS_AUDIT:
|
||||
updateGoodsNum(messageExt);
|
||||
break;
|
||||
//删除商品
|
||||
case GOODS_DELETE:
|
||||
deleteGoods(messageExt);
|
||||
updateGoodsNum(messageExt);
|
||||
break;
|
||||
//规格删除
|
||||
case SKU_DELETE:
|
||||
@@ -156,8 +158,6 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
*/
|
||||
private void deleteGoods(MessageExt messageExt) {
|
||||
Goods goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
|
||||
//更新店铺商品数量
|
||||
storeService.updateStoreGoodsNum(goods.getStoreId());
|
||||
|
||||
//删除获取分销商品
|
||||
DistributionGoods distributionGoods = distributionGoodsService.getOne(new LambdaQueryWrapper<DistributionGoods>()
|
||||
@@ -171,6 +171,18 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
||||
distributionGoodsService.removeById(distributionGoods.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品数量
|
||||
*
|
||||
* @param messageExt
|
||||
*/
|
||||
private void updateGoodsNum(MessageExt messageExt) {
|
||||
|
||||
Goods goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
|
||||
//更新店铺商品数量
|
||||
storeService.updateStoreGoodsNum(goods.getStoreId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品购买完成
|
||||
* 1.更新商品购买数量
|
||||
|
||||
Reference in New Issue
Block a user