店铺商品数量变更问题处理。
This commit is contained in:
parent
b78f1e512e
commit
3c9c3c2c17
@ -178,8 +178,14 @@ public class GoodsMessageListener implements RocketMQListener<MessageExt> {
|
|||||||
*/
|
*/
|
||||||
private void updateGoodsNum(MessageExt messageExt) {
|
private void updateGoodsNum(MessageExt messageExt) {
|
||||||
|
|
||||||
Goods goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
|
Goods goods = null;
|
||||||
|
try {
|
||||||
|
goods = JSONUtil.toBean(new String(messageExt.getBody()), Goods.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("商品传输信息错误-{}", messageExt.toString());
|
||||||
|
}
|
||||||
//更新店铺商品数量
|
//更新店铺商品数量
|
||||||
|
assert goods != null;
|
||||||
storeService.updateStoreGoodsNum(goods.getStoreId());
|
storeService.updateStoreGoodsNum(goods.getStoreId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user