From ea220e17473aaa0b1a1c16bfa63e137c120f4a46 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期五, 17 一月 2025 15:41:51 +0800 Subject: [PATCH] 12.18 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java index e1f9f86..00450e3 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java @@ -202,7 +202,7 @@ if(StringUtils.isNotEmpty(order.getExpressResult())){ MapTrackKD100Vo mapTrackKD100Vo = JSON.parseObject(order.getExpressResult(), MapTrackKD100Vo.class); List<QueryKD100ListVo> data = mapTrackKD100Vo.getData(); - orderDetailVO.setExpress(data.size() > 0 ? data.get(0).getContext() : ""); + orderDetailVO.setExpress(null != data && data.size() > 0 ? data.get(0).getContext() : ""); } if(order.getOrderType() == 1){ @@ -283,6 +283,7 @@ if(StringUtils.isNotEmpty(technicianId) && !"null".equals(technicianId)){ order.setTechnicianId(Integer.valueOf(technicianId)); } + // TODO orderMapper.updateById(order); } @@ -467,7 +468,7 @@ BigDecimal balance = appUser.getBalance(); if(null != orderBalancePayment){ appUser.setTotalRedPacketAmount(appUser.getTotalRedPacketAmount().add(orderBalancePayment.getRedPacketAmount()).setScale(2, RoundingMode.HALF_EVEN)); - appUser.setTotalDistributionAmount(appUser.getTotalDistributionAmount().add(orderBalancePayment.getDistributionAmount()).setScale(2, RoundingMode.HALF_EVEN)); +// appUser.setTotalDistributionAmount(appUser.getTotalDistributionAmount().add(orderBalancePayment.getDistributionAmount()).setScale(2, RoundingMode.HALF_EVEN)); } appUser.setBalance(balance.add(paymentAmount).setScale(2, RoundingMode.HALF_EVEN)); appUser.setShopAmount(appUser.getShopAmount().subtract(paymentAmount).setScale(2, RoundingMode.HALF_EVEN)); @@ -559,7 +560,7 @@ BigDecimal balance = appUser.getBalance(); if(null != orderBalancePayment){ appUser.setTotalRedPacketAmount(appUser.getTotalRedPacketAmount().add(orderBalancePayment.getRedPacketAmount()).setScale(2, RoundingMode.HALF_EVEN)); - appUser.setTotalDistributionAmount(appUser.getTotalDistributionAmount().add(orderBalancePayment.getDistributionAmount()).setScale(2, RoundingMode.HALF_EVEN)); +// appUser.setTotalDistributionAmount(appUser.getTotalDistributionAmount().add(orderBalancePayment.getDistributionAmount()).setScale(2, RoundingMode.HALF_EVEN)); } appUser.setBalance(balance.add(expressAmount).setScale(2, RoundingMode.HALF_EVEN)); //构建账户余额流水明细 @@ -807,6 +808,7 @@ } List<OrderGood> orderGoods = orderGoodMapper.selectList(new LambdaQueryWrapper<OrderGood>().eq(OrderGood::getOrderId, orderId).eq(OrderGood::getDelFlag, 0)); int sum = orderGoods.stream().mapToInt(OrderGood::getNum).sum(); + System.out.println("111111111111222"); orderInfo.setGoodsNum(sum); List<Object> goodsJson = new ArrayList<>(); for (OrderGood orderGood : orderGoods) { -- Gitblit v1.7.1