From a83cb50d398ea136f1a271e0e054b84e97708732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=81=B0=E7=81=B0?= Date: Mon, 24 Mar 2025 14:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=90=8E=E5=8F=B0=E3=80=90=E5=8F=96=E6=B6=88=E5=B9=B6?= =?UTF-8?q?=E9=80=80=E6=AC=BE=E3=80=91=E6=93=8D=E4=BD=9C=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF=E5=8F=8A=E5=88=A4=E6=96=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Order/CoreCmsOrderServices.cs | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs b/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs index 7c251135..73876a0b 100644 --- a/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs +++ b/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs @@ -1655,15 +1655,15 @@ namespace CoreCms.Net.Services //获取订单并确认是否属于已支付并未发货的订单 var where = PredicateBuilder.True(); where = where.And(p => p.orderId == orderId); - where = where.And(p => p.payStatus == (int)GlobalEnumVars.OrderPayStatus.Yes); - where = where.And(p => p.status == (int)GlobalEnumVars.OrderStatus.Normal); - where = where.And(p => p.shipStatus == (int)GlobalEnumVars.OrderShipStatus.No); + //where = where.And(p => p.payStatus == (int)GlobalEnumVars.OrderPayStatus.PartialNo); + //where = where.And(p => p.status == (int)GlobalEnumVars.OrderStatus.Normal); + //where = where.And(p => p.shipStatus == (int)GlobalEnumVars.OrderShipStatus.No); var orderInfo = await _dal.QueryByClauseAsync(where); if (orderInfo == null) { jm.status = false; - jm.msg = "不满足条件,必须是已支付未发货订单。"; + jm.msg = "不满足条件,订单获取失败。"; return jm; } @@ -1676,6 +1676,25 @@ namespace CoreCms.Net.Services return jm; } + if (orderInfo.status!= (int)GlobalEnumVars.OrderStatus.Normal) + { + jm.status = false; + jm.msg = "不满足条件,订单必须是进行中状态。"; + return jm; + } + if (orderInfo.shipStatus != (int)GlobalEnumVars.OrderShipStatus.No) + { + jm.status = false; + jm.msg = "不满足条件,订单必须是未发货状态。"; + return jm; + } + if (orderInfo.payStatus != (int)GlobalEnumVars.OrderPayStatus.Yes) + { + jm.status = false; + jm.msg = "不满足条件,订单必须是已付款状态。"; + return jm; + } + orderInfo.items = await _orderItemServices.QueryListByClauseAsync(p => p.orderId == orderInfo.orderId); AfterSalesVal(orderInfo, 0);