| | |
| | | import com.ruoyi.order.model.Order; |
| | | import com.ruoyi.order.model.OrderGood; |
| | | import com.ruoyi.order.model.ShoppingCart; |
| | | import com.ruoyi.order.service.CommissionService; |
| | | import com.ruoyi.order.service.OrderGoodService; |
| | | import com.ruoyi.order.service.OrderService; |
| | | import com.ruoyi.order.service.ShoppingCartService; |
| | |
| | | |
| | | @Resource |
| | | private BalanceChangeRecordClient balanceChangeRecordClient; |
| | | |
| | | @Resource |
| | | private CommissionService commissionService; |
| | | |
| | | |
| | | |
| | |
| | | order.setShopId(shoppingCartPayment.getShopId()); |
| | | order.setDelFlag(0); |
| | | order.setCreateTime(LocalDateTime.now()); |
| | | order.setExpressPayMethod(shoppingCartPayment.getFreightPaymentType()); |
| | | |
| | | if(2 == shoppingCartPayment.getPaymentType()){ |
| | | BigDecimal balance = appUser.getBalance(); |
| | |
| | | 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()); |