程旭源 6 months ago
parent
commit
497966d927
1 changed files with 3 additions and 2 deletions
  1. 3 2
      application/api/controller/Index.php

+ 3 - 2
application/api/controller/Index.php

@@ -35,7 +35,7 @@ class Index extends Api
     //跟新收益
     //跟新收益
     public function upincome()
     public function upincome()
     {
     {
-
+        $start = time();
         $maxId = $this->recordModel->max('id');
         $maxId = $this->recordModel->max('id');
 
 
         $recorddata = $this->recordModel
         $recorddata = $this->recordModel
@@ -71,6 +71,7 @@ class Index extends Api
             $this->recordModel->where("id", "<=", $maxId)->where(['status' => 0])->update(['status' => 1]);
             $this->recordModel->where("id", "<=", $maxId)->where(['status' => 0])->update(['status' => 1]);
 //            }
 //            }
         }
         }
+        echo time() - $start. '-----';
         Db::commit();
         Db::commit();
         return $returndata;
         return $returndata;
     }
     }
@@ -85,7 +86,7 @@ class Index extends Api
         $spacetime = 60 * 60;
         $spacetime = 60 * 60;
         $returndata = '';
         $returndata = '';
         $userdata = db('admin')->field("id")
         $userdata = db('admin')->field("id")
-            ->where(['livetime' => ['gt', $nowtime - $spacetime]])
+//            ->where(['livetime' => ['gt', $nowtime - $spacetime]])
             ->where(['incomeendtime' => ['gt', $nowtime]])
             ->where(['incomeendtime' => ['gt', $nowtime]])
             ->select();
             ->select();
         Db::startTrans();
         Db::startTrans();