update waiting req

This commit is contained in:
dongpd 2020-09-23 09:52:39 +07:00
parent c175187f4f
commit aade992cf9
2 changed files with 10 additions and 1 deletions

View File

@ -61,4 +61,13 @@ class ApiController extends Controller {
} }
} }
public function actionTest() {
$ls = \app\models\WaitingReq::find()->limit(10)->all();
$c = \app\models\WaitingReq::find()->count();
echo "<pre>";
var_dump($c, $ls);
echo "</pre>";
return;
}
} }

View File

@ -44,7 +44,7 @@ class WaitingReq extends \yii\db\ActiveRecord {
public function create($data) { public function create($data) {
$r = $this->load([ $r = $this->load([
'content' => $data, 'content' => json_encode($data),
'time' => time() 'time' => time()
], ''); ], '');
if ($r) { if ($r) {