作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into lyh-server

@@ -9,6 +9,7 @@ namespace App\Http\Controllers\Api; @@ -9,6 +9,7 @@ namespace App\Http\Controllers\Api;
9 9
10 use App\Enums\Common\Code; 10 use App\Enums\Common\Code;
11 use App\Http\Logic\Bside\User\UserLoginLogic; 11 use App\Http\Logic\Bside\User\UserLoginLogic;
  12 +use App\Models\Ai\AiBlog;
12 use App\Models\Blog\Blog; 13 use App\Models\Blog\Blog;
13 use App\Models\Domain\DomainInfo; 14 use App\Models\Domain\DomainInfo;
14 use App\Models\News\News; 15 use App\Models\News\News;
@@ -317,6 +318,7 @@ class PrivateController extends BaseController @@ -317,6 +318,7 @@ class PrivateController extends BaseController
317 $news = News::where(['status' => News::STATUS_ONE])->where('release_at', '>', $date)->pluck('url'); 318 $news = News::where(['status' => News::STATUS_ONE])->where('release_at', '>', $date)->pluck('url');
318 $blog = Blog::where(['status' => Blog::STATUS_ONE])->where('release_at', '>', $date)->pluck('url'); 319 $blog = Blog::where(['status' => Blog::STATUS_ONE])->where('release_at', '>', $date)->pluck('url');
319 // $keyword = Keyword::where('created_at', '>', $date)->pluck('route'); 320 // $keyword = Keyword::where('created_at', '>', $date)->pluck('route');
  321 + $ai_blog = AiBlog::where(['status' => AiBlog::STATUS_FINISH])->where('updated_at', '>=', $date)->pluck('route');
320 322
321 // 组装链接 323 // 组装链接
322 foreach ($product as $item) { 324 foreach ($product as $item) {
@@ -335,6 +337,10 @@ class PrivateController extends BaseController @@ -335,6 +337,10 @@ class PrivateController extends BaseController
335 $url = 'https://' . $domain . '/blogs/' . $item; 337 $url = 'https://' . $domain . '/blogs/' . $item;
336 array_push($result, $url); 338 array_push($result, $url);
337 } 339 }
  340 + foreach ($ai_blog as $item) {
  341 + $url = 'https://' . $domain . '/blog/' . $item;
  342 + array_push($result, $url);
  343 + }
338 return $this->success($result); 344 return $this->success($result);
339 } 345 }
340 346
@@ -10,4 +10,7 @@ class AiBlog extends Base @@ -10,4 +10,7 @@ class AiBlog extends Base
10 //连接数据库 10 //连接数据库
11 protected $connection = 'custom_mysql'; 11 protected $connection = 'custom_mysql';
12 12
  13 + const STATUS_INIT = 0;
  14 + const STATUS_RUNNING = 1;
  15 + const STATUS_FINISH = 2;
13 } 16 }