调用商品服务扣减库存
This commit is contained in:
@@ -115,8 +115,13 @@ public class OrderInfoRpcServiceImpl implements OrderInfoRpcService {
|
|||||||
if (orderInfo == null) {
|
if (orderInfo == null) {
|
||||||
throw new CzgException("订单不存在");
|
throw new CzgException("订单不存在");
|
||||||
}
|
}
|
||||||
|
Integer placeNum = orderInfo.getPlaceNum();
|
||||||
// 查询订单下商品
|
// 查询订单下商品
|
||||||
List<OrderDetail> detailList = orderDetailMapper.selectListByQuery(QueryWrapper.create().eq(OrderDetail::getOrderId, orderId));
|
List<OrderDetail> detailList = orderDetailMapper.selectListByQuery(
|
||||||
|
QueryWrapper.create()
|
||||||
|
.eq(OrderDetail::getOrderId, orderId)
|
||||||
|
.eq(OrderDetail::getPlaceNum, placeNum)
|
||||||
|
);
|
||||||
if (CollUtil.isEmpty(detailList)) {
|
if (CollUtil.isEmpty(detailList)) {
|
||||||
throw new CzgException("该订单下不存在商品");
|
throw new CzgException("该订单下不存在商品");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user