Просмотр исходного кода

移动端收银台时间问题修复

吴昊天 2 лет назад
Родитель
Сommit
6cd584ffad

+ 4 - 1
crmeb/app/api/controller/v1/order/StoreOrderController.php

@@ -211,9 +211,13 @@ class StoreOrderController
     }
 
     /**
+     * @param Request $request
      * @param $orderId
      * @param string $type
      * @return \think\Response
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      * @author 等风来
      * @email 136327134@qq.com
      * @date 2023/2/13
@@ -223,7 +227,6 @@ class StoreOrderController
         if (!$orderId) {
             return app('json')->fail(100100);
         }
-
         return app('json')->success($this->services->getCashierInfo((int)$request->uid(), $orderId, $type));
     }
 

+ 6 - 5
crmeb/app/services/order/StoreOrderServices.php

@@ -2599,6 +2599,7 @@ HTML;
     }
 
     /**
+     * @param int $uid
      * @param string $orderId
      * @param string $type
      * @return array
@@ -2630,14 +2631,14 @@ HTML;
                 if (!$info) {
                     throw new PayException('您支付的订单不存在');
                 }
-                $orderCancelTime = (int)sys_config('order_cancel_time', 0);
-                $orderActivityTime = (int)sys_config('order_activity_time', 0);
+                $orderCancelTime = sys_config('order_cancel_time', 0);
+                $orderActivityTime = sys_config('order_activity_time', 0);
                 if ($info->combination_id) {
-                    $time = ((int)sys_config('order_pink_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
+                    $time = (sys_config('order_pink_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
                 } else if ($info->seckill_id) {
-                    $time = ((int)sys_config('order_seckill_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
+                    $time = (sys_config('order_seckill_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
                 } else if ($info->bargain_id) {
-                    $time = ((int)sys_config('order_bargain_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
+                    $time = (sys_config('order_bargain_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
                 } else {
                     $time = $orderCancelTime * 60 * 60 + ((int)$info->add_time);
                 }