From c4664502dfdaffff555b532e65b51a57ac8b29c2 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 16 十月 2024 17:51:32 +0800 Subject: [PATCH] 合并代码 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java index 2a9cf5f..f686282 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java @@ -202,14 +202,16 @@ for (int i = 0; i < split1.length; i++) { Integer reduce = tShoppingOrderService.list(new QueryWrapper<TShoppingOrder>() .eq("order_type",1) - .ne("refund_status", 2)) + .eq("goods_id", split1[i]) + .isNull("refund_status")) .stream().map(TShoppingOrder::getPurchaseQuantity).reduce(0, Integer::sum); res.add(reduce); } break; case 2: for (int i = 0; i < split1.length; i++) { - Integer reduce = exchangeOrderService.list(new QueryWrapper<TExchangeOrder>().eq("order_type",1).ne("status",4).eq("goods_id", split1[i])) + Integer reduce = exchangeOrderService.list(new QueryWrapper<TExchangeOrder>().eq("order_type",1) + .ne("status",4).eq("goods_id", split1[i])) .stream().map(TExchangeOrder::getPurchaseQuantity).reduce(0, Integer::sum); res.add(reduce); } -- Gitblit v1.7.1