作者 lyh

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

@@ -608,6 +608,8 @@ class PrivateController extends BaseController @@ -608,6 +608,8 @@ class PrivateController extends BaseController
608 public function getExternalLink(Request $request) 608 public function getExternalLink(Request $request)
609 { 609 {
610 $max_id = DB::table('gl_project_external_link_make')->where(['status' => 0])->max('id'); 610 $max_id = DB::table('gl_project_external_link_make')->where(['status' => 0])->max('id');
  611 + if (empty($max_id))
  612 + return $this->success();
611 $links = DB::table('gl_project_external_link_make')->where(['status' => 0])->where('id', '<=', $max_id)->pluck('external_link')->toArray(); 613 $links = DB::table('gl_project_external_link_make')->where(['status' => 0])->where('id', '<=', $max_id)->pluck('external_link')->toArray();
612 DB::table('gl_project_external_link_make')->where(['status' => 0])->where('id', '<=', $max_id)->update(['status' => 1, 'updated_at' => date('Y-m-d H:i;s')]); 614 DB::table('gl_project_external_link_make')->where(['status' => 0])->where('id', '<=', $max_id)->update(['status' => 1, 'updated_at' => date('Y-m-d H:i;s')]);
613 return $this->success($links); 615 return $this->success($links);
@@ -16,6 +16,7 @@ use App\Models\Ai\AiBlogAuthor; @@ -16,6 +16,7 @@ use App\Models\Ai\AiBlogAuthor;
16 use App\Models\Channel\Channel; 16 use App\Models\Channel\Channel;
17 use App\Models\Channel\User; 17 use App\Models\Channel\User;
18 use App\Models\Channel\Zone; 18 use App\Models\Channel\Zone;
  19 +use App\Models\Com\CollectLog;
19 use App\Models\Com\NoticeLog; 20 use App\Models\Com\NoticeLog;
20 use App\Models\Com\UpdateLog; 21 use App\Models\Com\UpdateLog;
21 use App\Models\Devops\Servers; 22 use App\Models\Devops\Servers;
@@ -116,6 +117,8 @@ class ProjectLogic extends BaseLogic @@ -116,6 +117,8 @@ class ProjectLogic extends BaseLogic
116 $info['minor_languages'] = $this->getProjectMinorLanguages($id); 117 $info['minor_languages'] = $this->getProjectMinorLanguages($id);
117 //升级项目采集完成时间 118 //升级项目采集完成时间
118 $info['collect_time'] = $info['is_upgrade'] ? UpdateLog::getProjectUpdate($id) : ''; 119 $info['collect_time'] = $info['is_upgrade'] ? UpdateLog::getProjectUpdate($id) : '';
  120 + //升级项目采集的测试站域名
  121 + $info['collect_test_domain'] = $info['is_upgrade'] ? CollectLog::getCollectTestDomain($id) : '';
119 //获取项目所属行业 122 //获取项目所属行业
120 $info['deploy_optimize']['industry'] = ProjectIndustryRelated::where('project_id', $id)->pluck('industry_id')->toArray(); 123 $info['deploy_optimize']['industry'] = ProjectIndustryRelated::where('project_id', $id)->pluck('industry_id')->toArray();
121 124
@@ -7,4 +7,16 @@ use App\Models\Base; @@ -7,4 +7,16 @@ use App\Models\Base;
7 class CollectLog extends Base 7 class CollectLog extends Base
8 { 8 {
9 protected $table = 'gl_collect_log'; 9 protected $table = 'gl_collect_log';
  10 +
  11 + /**
  12 + * 获取最近一次填写的采集域名
  13 + * @param $project_id
  14 + * @return string
  15 + * @author Akun
  16 + * @date 2025/09/19 14:31
  17 + */
  18 + public static function getCollectTestDomain($project_id)
  19 + {
  20 + return self::where('project_id', $project_id)->orderBy('id', 'desc')->value('test_domain') ?? '';
  21 + }
10 } 22 }