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