shish před 2 roky
rodič
revize
ccbf29160b

+ 3 - 3
app-ghs/controllers/OrderController.php

@@ -1011,15 +1011,15 @@ class OrderController extends BaseController
             }
         }
 
-        $orderDate = $post['orderDate'] ?? '';
-        if (!empty($orderDate)) {
+        $historyDate = $post['historyDate'] ?? '';
+        if (!empty($historyDate)) {
             if ($book == 1) {
                 util::fail('预订单不能选订单日期');
             }
             if ($hasPay == 0) {
                 util::fail('扫码付不能选订单日期');
             }
-            if (strtotime($orderDate) > strtotime(date("Y-m-d"))) {
+            if (strtotime($historyDate) > strtotime(date("Y-m-d"))) {
                 util::fail('订单日期只能选历史时间');
             }
         }

+ 4 - 4
biz-ghs/order/services/OrderService.php

@@ -279,11 +279,11 @@ class OrderService extends BaseService
             self::payAfter($returnOrder, $payWay);
 
             //开历史订单
-            $orderDate = $data['orderDate'] ?? '';
-            if (!empty($orderDate)) {
-                $purchase->payTime = $orderDate . ' 12:00:00';
+            $historyDate = $data['historyDate'] ?? '';
+            if (!empty($historyDate)) {
+                $purchase->payTime = $historyDate . ' 12:00:00';
                 $purchase->save();
-                $returnOrder->payTime = $orderDate . ' 12:00:00';
+                $returnOrder->payTime = $historyDate . ' 12:00:00';
                 $returnOrder->save();
             }