Browse Source

过期时间

shish 4 years ago
parent
commit
1cfd246de7
2 changed files with 5 additions and 2 deletions
  1. 4 1
      app-ghs/controllers/OrderController.php
  2. 1 1
      common/components/dict.php

+ 4 - 1
app-ghs/controllers/OrderController.php

@@ -685,7 +685,10 @@ class OrderController extends BaseController
             ProductClass::valid($productList, $this->mainId);
             $post['product'] = $productList;
             //商家开单到时间会自动标记为欠款,所以360天内不过期,以保证足够时间标记欠款,具体参数查看dict local_gys_kd_auto_set_debt_time
-            $post['deadline'] = date("Y-m-d H:i:s", strtotime('+360 day'));
+            $time = time();
+            $hasTime = dict::getDict('order_pay_has_time');
+            $totalTime = bcadd($time, $hasTime);
+            $post['deadline'] = date("Y-m-d H:i:s", $totalTime);
             $return = OrderService::createFinishOrder($post, $custom, $hasPay);
             $transaction->commit();
             util::success($return);

+ 1 - 1
common/components/dict.php

@@ -70,7 +70,7 @@ class dict
         //是否在线支付
         'onlinePay' => ['not' => 1, 'yes' => 2],
 
-        //商家开单了,客户多少秒后未付款,自动标记欠款。由于未付款单自动标记为欠款,商家开的订单360天内都不过期。
+        //商家开单了,客户多少秒后未付款,自动标记欠款。由于未付款单自动标记为欠款,商家开的订单360天内都不过期。此功能弃用
         'local_gys_kd_auto_set_debt_time' => 600,
         //客户采购订单有效期是多少秒,有效期内可以支付,到期自动取消。
         'order_pay_has_time' => 600,