Commit d262986d by weijiguang

下单时校验订单中sku数量

parent 1cac5c58
......@@ -175,7 +175,10 @@ public class OrderServiceImpl implements IOrderService {
orderDetail.setCreatedAt(new Date());
orderDetail.setUpdatedAt(new Date());
orderDetail.setMachineId(machineId);
orderDetailMapper.insertOrderDetail(orderDetail);
orderDetail.setNum("1");
for (int i = 0; i < Integer.parseInt(orderDetail.getNum()); i++) {
orderDetailMapper.insertOrderDetail(orderDetail);
}
}
// 更新用户的优惠券状态
......@@ -658,7 +661,7 @@ public class OrderServiceImpl implements IOrderService {
}
for (GoodsVo good : goods) {
String cateAndGoodsIdStr = good.getCategory() + good.getGoodsId();
if(cateAndGoodsIdSet.contains(cateAndGoodsIdStr)) {
if (cateAndGoodsIdSet.contains(cateAndGoodsIdStr)) {
continue;
} else {
cateAndGoodsIdSet.add(cateAndGoodsIdStr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment