Browse Source

计划任务自动完成订单

lizhen_gitee 8 months ago
parent
commit
ac28c4cccb
1 changed files with 9 additions and 9 deletions
  1. 9 9
      application/index/controller/Plantask.php

+ 9 - 9
application/index/controller/Plantask.php

@@ -106,7 +106,7 @@ class Plantask extends Controller
         }
 
         foreach($list as $key => $order){
-            $this->finish($order['id']);
+            echo $order['id'].':'.$this->finish($order['id']);
         }
     }
 
@@ -123,7 +123,7 @@ class Plantask extends Controller
         }
 
         foreach($list as $key => $order){
-            $this->finish($order['id']);
+            echo $order['id'].':'.$this->finish($order['id']);
         }
     }
 
@@ -139,7 +139,7 @@ class Plantask extends Controller
         }
 
         foreach($list as $key => $order){
-            $this->finish($order['id']);
+            echo $order['id'].':'.$this->finish($order['id']);
         }
     }
 
@@ -151,14 +151,14 @@ class Plantask extends Controller
         if(empty($wenzhen_order)){
             Db::rollback();
             //$this->error('不存在的订单');
-            return false;
+            return '不存在的订单';
         }
 
         if($wenzhen_order['ordertype'] == 1){
             if($wenzhen_order['status'] != 20){
                 Db::rollback();
                 //$this->error('已接诊订单才能完成');
-                return false;
+                return '已接诊订单才能完成';
             }
 
             $old_status = 20;
@@ -167,7 +167,7 @@ class Plantask extends Controller
             if($wenzhen_order['status'] != 25){
                 Db::rollback();
                 //$this->error('尚未发起视频,不能结束');
-                return false;
+                return '尚未发起视频,不能结束';
             }
 
             $old_status = 25;
@@ -187,7 +187,7 @@ class Plantask extends Controller
             if($rs_wallet['status'] === false){
                 Db::rollback();
                 //$this->error($rs_wallet['msg']);
-                return false;
+                return $rs_wallet['msg'];
             }
         }
 
@@ -196,7 +196,7 @@ class Plantask extends Controller
         if(!$update_rs){
             Db::rollback();
             //$this->error('操作失败');
-            return false;
+            return '操作失败';
         }
 
         //医生接诊量
@@ -219,7 +219,7 @@ class Plantask extends Controller
 
 
         //$this->success('操作成功');
-        return true;
+        return '操作成功';
     }
 
 /////////////////////////////////////////////////////////////////////////