phpcjl
2024-12-06 3e95b11cff2e6f59a7d23448f86d3d3bf806e13a
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -853,14 +853,12 @@
            orderGood.setSeckillJson(JSON.toJSONString(goodsSeckill));
         }
         for (int i = 0; i < objects.size(); i++) {
            Long id = objects.getJSONObject(i).getLong("id");
            if(myShoppingCartVo.getId().equals(id)){
               Integer num1 = objects.getJSONObject(i).getInteger("num");
               orderGood.setNum(num1);
               Goods goods1 = goodsClient.getGoodsById(myShoppingCartVo.getGoodsId()).getData();
               orderGood.setGoodJson(JSON.toJSONString(goods1));
               break;
            }
            Integer id = objects.getJSONObject(i).getInteger("id");
            Integer num1 = objects.getJSONObject(i).getInteger("num");
            orderGood.setNum(num1);
            Goods goods1 = goodsClient.getGoodsById(id).getData();
            orderGood.setGoodJson(JSON.toJSONString(goods1));
            break;
         }
         orderGood.setDelFlag(0);
         orderGood.setCreateTime(LocalDateTime.now());