From ae8c2215617ba68db6fc4a66437428f8b6efc60a Mon Sep 17 00:00:00 2001 From: yangqingyuan Date: Wed, 4 Sep 2024 14:50:59 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=B3=A8=E9=87=8A=E6=8E=89change-o?= =?UTF-8?q?rder-no=20=E6=8E=A5=E5=8F=A3=EF=BC=8C=E7=95=99=E7=BB=99?= =?UTF-8?q?=E7=9C=9F=E6=AD=A3=E6=87=82=E9=9C=80=E6=B1=82=E7=9A=84=E4=BA=BA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/controller/OrderPayController.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java b/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java index 240fafb..bab5419 100644 --- a/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java +++ b/src/main/java/com/gxwebsoft/shop/controller/OrderPayController.java @@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.gxwebsoft.apps.entity.EquipmentGoods; import com.gxwebsoft.apps.service.EquipmentGoodsService; +import com.gxwebsoft.common.core.utils.JSONUtil; import com.gxwebsoft.common.core.web.BaseController; import com.gxwebsoft.common.system.entity.User; import com.gxwebsoft.shop.entity.FreezeOrder; @@ -104,15 +105,15 @@ public class OrderPayController extends BaseController { @GetMapping("/change-order-no") public ApiResult changeOrderNo() { - List list = orderPayService.list(); - if (CollectionUtil.isNotEmpty(list)) { - for (OrderPay orderPay : list) { - if (!orderPay.getOrderNo().equals(orderPay.getOriginOrderNo())) { - orderPay.setOrderNo(IdUtil.getSnowflakeNextIdStr()); - orderPayService.updateById(orderPay); - } - } - } +// List list = orderPayService.list(); +// if (CollectionUtil.isNotEmpty(list)) { +// for (OrderPay orderPay : list) { +// if (!orderPay.getOrderNo().equals(orderPay.getOriginOrderNo())) {//FIXME 判断不相同,就更新orderNo?调用接口一次,全量更新ID?意义何在?这里先注释掉吧, +// orderPay.setOrderNo(IdUtil.getSnowflakeNextIdStr()); +// orderPayService.updateById(orderPay); +// } +// } +// } return success(); }