规范店铺模块调用商品模块方法

This commit is contained in:
Chopper
2021-11-30 10:00:46 +08:00
parent b65cdfc1fb
commit 71e51b3b6f
4 changed files with 25 additions and 15 deletions

View File

@@ -369,9 +369,8 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
*/
private void updateGoodsNum(MessageExt messageExt) {
Goods goods;
try {
goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
Goods goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
//更新店铺商品数量
assert goods != null;
storeService.updateStoreGoodsNum(goods.getStoreId());