Commit 255f9567 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/optimize' into develop

parents 5a4d7c8e 26cf8255
...@@ -36,9 +36,14 @@ class ArticleController extends Controller ...@@ -36,9 +36,14 @@ class ArticleController extends Controller
if (!isset($resp['list'])) { if (!isset($resp['list'])) {
return 0; return 0;
} }
$create_time = Article::find()->where(['source' => 1])->max('create_time');
$list = $resp['list'][0]['lives']; $list = $resp['list'][0]['lives'];
if ($create_time >= $list[0]['created_at']) {
return 0;
}
$list = Tools::arraySort($list, 'created_at', SORT_ASC); $list = Tools::arraySort($list, 'created_at', SORT_ASC);
$create_time = Article::find()->where(['source' => 1])->max('create_time');
$article = new Article(); $article = new Article();
foreach ($list as &$item) { foreach ($list as &$item) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment