xieruidong 2 years ago
parent
commit
543afa32e7
1 changed files with 5 additions and 1 deletions
  1. 5 1
      application/api/controller/mall/Orders.php

+ 5 - 1
application/api/controller/mall/Orders.php

@@ -280,9 +280,13 @@ class Orders extends Api
             $this->_validate([
                 'fix_order_no|维修订单号'=>['require',],
             ]);
+            $showTime=Cache::get("user_order_show_{$user['id']}",null);
+            if(!$showTime){
+                $this->error('请先支付维修单');
+            }
             $fixOrder=Order::statusPay()
                 ->where('order_no',$data['fix_order_no'])
-                ->where('pay_time',Cache::get("user_order_show_{$user['id']}",null))
+                ->where('pay_time','>',$showTime)
                 ->find();
             if(!$fixOrder){
                 $this->error('请完成维修订单支付');