作者 赵彬吉
@@ -4,6 +4,7 @@ namespace App\Console\Commands\Ai; @@ -4,6 +4,7 @@ namespace App\Console\Commands\Ai;
4 4
5 use App\Http\Logic\Aside\Project\ProjectLogic; 5 use App\Http\Logic\Aside\Project\ProjectLogic;
6 use App\Models\Ai\AiBlog; 6 use App\Models\Ai\AiBlog;
  7 +use App\Models\Ai\AiBlogKeyword;
7 use App\Models\Ai\AiBlogOpenLog; 8 use App\Models\Ai\AiBlogOpenLog;
8 use App\Models\Project\AiBlogTask as AiBlogTaskModel; 9 use App\Models\Project\AiBlogTask as AiBlogTaskModel;
9 use App\Models\Project\Project; 10 use App\Models\Project\Project;
@@ -77,6 +78,9 @@ class AiBlogAutoPublish extends Command @@ -77,6 +78,9 @@ class AiBlogAutoPublish extends Command
77 $this->output("项目{$project->id}未到执行时间" . $next_auto_date); 78 $this->output("项目{$project->id}未到执行时间" . $next_auto_date);
78 continue; 79 continue;
79 } 80 }
  81 + $aiKeywordModel = new AiBlogKeyword();
  82 + $keywords = $aiKeywordModel->getValue(['project_id'=>$this->user['project_id']],'keywords');
  83 + if(!empty($keywords)){
80 //核心关键词+网站关键词+白帽关键词 84 //核心关键词+网站关键词+白帽关键词
81 $main_keywords = ProjectKeyword::where('project_id', $project->id)->value('main_keyword'); 85 $main_keywords = ProjectKeyword::where('project_id', $project->id)->value('main_keyword');
82 $main_keywords = explode("\r\n", $main_keywords); 86 $main_keywords = explode("\r\n", $main_keywords);
@@ -88,6 +92,11 @@ class AiBlogAutoPublish extends Command @@ -88,6 +92,11 @@ class AiBlogAutoPublish extends Command
88 $site_keywords = explode(",", $site_keywords); 92 $site_keywords = explode(",", $site_keywords);
89 $keywords = array_filter(array_merge($main_keywords, $site_keywords, $seo_keywords)); 93 $keywords = array_filter(array_merge($main_keywords, $site_keywords, $seo_keywords));
90 $keywords = array_map('trim', $keywords); 94 $keywords = array_map('trim', $keywords);
  95 + }else{
  96 + $keywords = explode("\r\n", $keywords);
  97 + $keywords = array_map('trim', $keywords); // 清理空格
  98 + $keywords = array_filter($keywords); // 移除空值
  99 + }
91 if (empty($keywords)) { 100 if (empty($keywords)) {
92 $this->output("项目{$project->id}未获取到关键词"); 101 $this->output("项目{$project->id}未获取到关键词");
93 continue; 102 continue;
@@ -82,9 +82,10 @@ class RemainDay extends Command @@ -82,9 +82,10 @@ class RemainDay extends Command
82 $list = $projectModel->list(['extend_type'=>Project::TYPE_ZERO,'type'=>['in',[Project::TYPE_TWO,Project::TYPE_THREE,Project::TYPE_FOUR,Project::TYPE_SIX]]],'id',['id','type','level','uptime','remain_day','version','is_remain_today','pause_days','finish_remain_day','bm_finish_remain_day','geo_qualify_num']); 82 $list = $projectModel->list(['extend_type'=>Project::TYPE_ZERO,'type'=>['in',[Project::TYPE_TWO,Project::TYPE_THREE,Project::TYPE_FOUR,Project::TYPE_SIX]]],'id',['id','type','level','uptime','remain_day','version','is_remain_today','pause_days','finish_remain_day','bm_finish_remain_day','geo_qualify_num']);
83 foreach ($list as $item){ 83 foreach ($list as $item){
84 $deploy_build = $deployBuildModel->read(['project_id'=>$item['id']],['service_duration','seo_service_duration','plan','seo_plan']); 84 $deploy_build = $deployBuildModel->read(['project_id'=>$item['id']],['service_duration','seo_service_duration','plan','seo_plan']);
85 - echo 'start->项目id:' . $item['id'] . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL; 85 + $this->output('start->项目id:' . $item['id']);
86 //todo::暂停的项目停止计时 86 //todo::暂停的项目停止计时
87 if(in_array($item['id'],$this->ceaseProjectId)){//暂停的项目 87 if(in_array($item['id'],$this->ceaseProjectId)){//暂停的项目
  88 + $this->output('暂停的项目id:' . $item['id']);
88 if(($item['type'] == Project::TYPE_TWO) && ($item['is_remain_today'] == 1)){ 89 if(($item['type'] == Project::TYPE_TWO) && ($item['is_remain_today'] == 1)){
89 $pause_days = $item['pause_days'] + 1; 90 $pause_days = $item['pause_days'] + 1;
90 } 91 }
@@ -96,6 +97,8 @@ class RemainDay extends Command @@ -96,6 +97,8 @@ class RemainDay extends Command
96 } 97 }
97 //todo::优化项目中途达标计时切换为按天计时 98 //todo::优化项目中途达标计时切换为按天计时
98 if(in_array($item['id'],$this->projectSwitchId)){ 99 if(in_array($item['id'],$this->projectSwitchId)){
  100 + $this->output('中途切换计时的项目id:' . $item['id'].',旧达标天数:'.$item['finish_remain_day'].',新达标天数:'.($item['finish_remain_day'] + 1));
  101 + $this->output('中途切换计时的项目id:' . $item['id'].',当前剩余服务时常:'.$item['remain_day'].',剩余时常:'.($item['remain_day'] - 1));
99 $this->project->edit(['remain_day'=>($item['remain_day'] - 1),'finish_remain_day'=>($item['finish_remain_day'] + 1)],['id'=>$item['id']]); 102 $this->project->edit(['remain_day'=>($item['remain_day'] - 1),'finish_remain_day'=>($item['finish_remain_day'] + 1)],['id'=>$item['id']]);
100 continue; 103 continue;
101 } 104 }
@@ -103,7 +106,7 @@ class RemainDay extends Command @@ -103,7 +106,7 @@ class RemainDay extends Command
103 $this->seoRemainDay($deploy_build,$item); 106 $this->seoRemainDay($deploy_build,$item);
104 //默认版本统计 107 //默认版本统计
105 $this->remainDay($item,$deploy_build); 108 $this->remainDay($item,$deploy_build);
106 - echo 'end->项目id:' . $item['id'] . '执行时间:'. date('Y-m-d H:i:s') . PHP_EOL; 109 + $this->output('end->项目id:' . $item['id']);
107 } 110 }
108 return true; 111 return true;
109 } 112 }
@@ -121,14 +124,17 @@ class RemainDay extends Command @@ -121,14 +124,17 @@ class RemainDay extends Command
121 //白帽版本的系统 124 //白帽版本的系统
122 if($deploy_build['seo_plan'] != 0){ 125 if($deploy_build['seo_plan'] != 0){
123 if($deploy_build['seo_service_duration'] != 0){ 126 if($deploy_build['seo_service_duration'] != 0){
  127 + $this->output('白帽计算剩余服务时常:'.$item['id']);
124 if(in_array($item['id'],$this->bm_projectId) || (in_array( 19,$item['level']))){ 128 if(in_array($item['id'],$this->bm_projectId) || (in_array( 19,$item['level']))){
125 $compliance_day = (int)$item['bm_finish_remain_day']; 129 $compliance_day = (int)$item['bm_finish_remain_day'];
126 $seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day']; 130 $seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day'];
  131 + $this->output('按白帽达标天数统计:'.$item['id'].',bm达标天数:'.$item['bm_finish_remain_day'].',bm剩余白帽天数:'.$seo_remain_day);
127 }else{ 132 }else{
128 //按自然日统计 133 //按自然日统计
129 $diff = time() - strtotime($item['uptime']); 134 $diff = time() - strtotime($item['uptime']);
130 $compliance_day = floor($diff / (60 * 60 * 24)); 135 $compliance_day = floor($diff / (60 * 60 * 24));
131 $seo_remain_day = $deploy_build['seo_service_duration'] - $compliance_day; 136 $seo_remain_day = $deploy_build['seo_service_duration'] - $compliance_day;
  137 + $this->output('按白帽自然日天数统计:'.$item['id'].',bm达标天数:'.$compliance_day.',bm剩余白帽天数:'.$seo_remain_day);
132 } 138 }
133 $this->project->edit(['seo_remain_day'=>$seo_remain_day,'bm_finish_remain_day'=>$compliance_day ?? 0],['id'=>$item['id']]); 139 $this->project->edit(['seo_remain_day'=>$seo_remain_day,'bm_finish_remain_day'=>$compliance_day ?? 0],['id'=>$item['id']]);
134 } 140 }
@@ -144,8 +150,10 @@ class RemainDay extends Command @@ -144,8 +150,10 @@ class RemainDay extends Command
144 * @time :2025/4/25 14:31 150 * @time :2025/4/25 14:31
145 */ 151 */
146 public function remainDay($item,$deploy_build){ 152 public function remainDay($item,$deploy_build){
  153 + $this->output('普通项目计算剩余服务时常:'.$item['id']);
147 //默认版本统计 154 //默认版本统计
148 if($deploy_build['service_duration'] == 0 || $deploy_build['plan'] == 0){ 155 if($deploy_build['service_duration'] == 0 || $deploy_build['plan'] == 0){
  156 + $this->output('当前项目跳过:'.$item['id']);
149 return false; 157 return false;
150 } 158 }
151 //默认版本计算剩余服务时常 159 //默认版本计算剩余服务时常
@@ -159,17 +167,21 @@ class RemainDay extends Command @@ -159,17 +167,21 @@ class RemainDay extends Command
159 $diff = time() - strtotime($opInfo['start_date'] ?? $item['uptime']); 167 $diff = time() - strtotime($opInfo['start_date'] ?? $item['uptime']);
160 $compliance_day = floor($diff / (60 * 60 * 24)); 168 $compliance_day = floor($diff / (60 * 60 * 24));
161 $remain_day = $deploy_build['service_duration'] - $compliance_day; 169 $remain_day = $deploy_build['service_duration'] - $compliance_day;
  170 + $this->output('已开始优化的时间结算:'.$item['id'].',剩余服务时常:'.$remain_day);
162 }else{ 171 }else{
163 $compliance_day = ($item['finish_remain_day'] ?? 0); 172 $compliance_day = ($item['finish_remain_day'] ?? 0);
164 //todo::7.5版本单独计算 173 //todo::7.5版本单独计算
165 if($item['version'] == 7.5 && $deploy_build['seo_plan'] != 0 && $deploy_build['plan'] != 0){ 174 if($item['version'] == 7.5 && $deploy_build['seo_plan'] != 0 && $deploy_build['plan'] != 0){
166 $geoCountModel = new GeoCount(); 175 $geoCountModel = new GeoCount();
167 $is_qualify = $geoCountModel->where('project_id', $item['id'])->orderBy('id', 'desc')->value('is_qualify'); 176 $is_qualify = $geoCountModel->where('project_id', $item['id'])->orderBy('id', 'desc')->value('is_qualify');
168 - if($compliance_day > 0 && $is_qualify > 0){  
169 - $compliance_day = 1;  
170 - } 177 + if($item['is_remain_today'] > 0 && $is_qualify > 0){
  178 + $remain_day = $item['remain_day'] - 1;
171 } 179 }
  180 + $this->output('7.5版本单独计算:'.$item['id'].',剩余服务时常:'.$remain_day);
  181 + }else{
172 $remain_day = $deploy_build['service_duration'] - $compliance_day; 182 $remain_day = $deploy_build['service_duration'] - $compliance_day;
  183 + $this->output('优化项目:'.$item['id'].',剩余服务时常:'.$remain_day.',已达标天数:'.$compliance_day);
  184 + }
173 } 185 }
174 }else{ 186 }else{
175 //普通建站项目 187 //普通建站项目
@@ -182,11 +194,20 @@ class RemainDay extends Command @@ -182,11 +194,20 @@ class RemainDay extends Command
182 } 194 }
183 } 195 }
184 $extend_type = 0; 196 $extend_type = 0;
185 -// if($remain_day < 0 && $deploy_build['service_duration'] != 0){  
186 -// $remain_day = 0;  
187 -// $extend_type = Project::TYPE_FIVE;  
188 -// }  
189 $this->project->edit(['remain_day'=>$remain_day,'extend_type'=>$extend_type,'finish_remain_day'=>$compliance_day ?? 0],['id'=>$item['id']]); 197 $this->project->edit(['remain_day'=>$remain_day,'extend_type'=>$extend_type,'finish_remain_day'=>$compliance_day ?? 0],['id'=>$item['id']]);
190 return true; 198 return true;
191 } 199 }
  200 +
  201 + /**
  202 + * 输入日志
  203 + * @param $message
  204 + * @return bool
  205 + */
  206 + public function output($message)
  207 + {
  208 + $message = date('Y-m-d H:i:s') . ' ' . $message . PHP_EOL;
  209 + echo $message;
  210 + file_put_contents(storage_path('logs/remain_day/') . date('Ymd') . '.log', $message, FILE_APPEND);
  211 + return true;
  212 + }
192 } 213 }
@@ -23,6 +23,7 @@ use App\Models\Project\Project; @@ -23,6 +23,7 @@ use App\Models\Project\Project;
23 use App\Models\Project\ProjectAiSetting; 23 use App\Models\Project\ProjectAiSetting;
24 use App\Models\Project\ProjectWhiteHatAffix; 24 use App\Models\Project\ProjectWhiteHatAffix;
25 use App\Models\RouteMap\RouteMap; 25 use App\Models\RouteMap\RouteMap;
  26 +use App\Models\SeoSetting\LinkData;
26 use App\Models\Template\BTemplateMain; 27 use App\Models\Template\BTemplateMain;
27 use App\Models\Template\TemplateTypeMain; 28 use App\Models\Template\TemplateTypeMain;
28 use App\Models\WebSetting\Translate; 29 use App\Models\WebSetting\Translate;
@@ -115,11 +116,23 @@ class lyhDemo extends Command @@ -115,11 +116,23 @@ class lyhDemo extends Command
115 public function _actionRoute(){ 116 public function _actionRoute(){
116 $projectModel = new Project(); 117 $projectModel = new Project();
117 $lists = $projectModel->list(['type'=>['in',[1,2,3,4,6]]], 'id', ['id']); 118 $lists = $projectModel->list(['type'=>['in',[1,2,3,4,6]]], 'id', ['id']);
118 - $data = []; 119 + $geoLinkModel = new GeoLink();
119 foreach ($lists as $item){ 120 foreach ($lists as $item){
120 echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL; 121 echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL;
121 - $data['post_id'] = mt_rand(100000, 999999).$item['id'];  
122 - $projectModel->edit(['post_id'=>$data['post_id']],['id'=>$item['id']]); 122 + ProjectServer::useProject($item['id']);
  123 + $linkDataModel = new LinkData();
  124 + $linkList = $linkDataModel->list();
  125 + foreach ($linkList as $link){
  126 + $geoLinkModel->add([
  127 + 'project_id'=>$item['id'],
  128 + 'url'=>$link['url'],
  129 + 'type'=>2,
  130 + 'da'=>$link['da_values'],
  131 + 'send_time'=>$link['send_time'],
  132 + 'time'=>$link['time'],
  133 + ]);
  134 + }
  135 + DB::disconnect('custom_mysql');
123 } 136 }
124 return true; 137 return true;
125 } 138 }
@@ -36,7 +36,7 @@ class SyncTimeFiles extends Command @@ -36,7 +36,7 @@ class SyncTimeFiles extends Command
36 // $start = '2025-10-14 00:00:00'; 36 // $start = '2025-10-14 00:00:00';
37 $start = '2025-10-25 00:00:00'; 37 $start = '2025-10-25 00:00:00';
38 $end = '2025-10-31 23:59:59'; 38 $end = '2025-10-31 23:59:59';
39 - $lists = $imagesModel->list(['created_at'=>['between',[$start,$end]]],'id',['path'],'asc'); 39 + $lists = $imagesModel->list(['created_at'=>['between',[$start,$end]]],'id',['path'],'desc');
40 foreach ($lists as $v){ 40 foreach ($lists as $v){
41 $path = $v['path']; 41 $path = $v['path'];
42 echo date('Y-m-d H:i:s') . ' | 图片链接:' . $path . PHP_EOL; 42 echo date('Y-m-d H:i:s') . ' | 图片链接:' . $path . PHP_EOL;
@@ -151,7 +151,7 @@ class InquiryController extends BaseController @@ -151,7 +151,7 @@ class InquiryController extends BaseController
151 } 151 }
152 $result = ReInquiryCount::where('domain', 'like', '%'.$domain.'%')->first(); 152 $result = ReInquiryCount::where('domain', 'like', '%'.$domain.'%')->first();
153 if($result){ 153 if($result){
154 - $result->tasks = $result->tasks; //调用访问器 154 +
155 $return = 0; //所有都关闭或删除就不返回 155 $return = 0; //所有都关闭或删除就不返回
156 foreach ($result->tasks as $task){ 156 foreach ($result->tasks as $task){
157 $return += (!$task['is_del'] && $task['status']); 157 $return += (!$task['is_del'] && $task['status']);
@@ -6,6 +6,7 @@ use App\Enums\Common\Code; @@ -6,6 +6,7 @@ use App\Enums\Common\Code;
6 use App\Enums\Common\Common; 6 use App\Enums\Common\Common;
7 use App\Exceptions\AsideGlobalException; 7 use App\Exceptions\AsideGlobalException;
8 use App\Http\Controllers\Controller; 8 use App\Http\Controllers\Controller;
  9 +use App\Models\Project\Project;
9 use Illuminate\Http\JsonResponse; 10 use Illuminate\Http\JsonResponse;
10 use Illuminate\Http\Request; 11 use Illuminate\Http\Request;
11 use Illuminate\Http\Exceptions\HttpResponseException; 12 use Illuminate\Http\Exceptions\HttpResponseException;
@@ -32,6 +33,7 @@ class BaseController extends Controller @@ -32,6 +33,7 @@ class BaseController extends Controller
32 { 33 {
33 $this->request = $request; 34 $this->request = $request;
34 $this->param = $this->request->all(); 35 $this->param = $this->request->all();
  36 + $this->handleIdAndProjectId();
35 $this->token = $this->request->header('token'); 37 $this->token = $this->request->header('token');
36 $this->getParam(); 38 $this->getParam();
37 $info = Cache::get(Common::MANAGE_TOKEN . $this->token); 39 $info = Cache::get(Common::MANAGE_TOKEN . $this->token);
@@ -42,6 +44,42 @@ class BaseController extends Controller @@ -42,6 +44,42 @@ class BaseController extends Controller
42 } 44 }
43 } 45 }
44 46
  47 + /**
  48 + * @remark :project_id+id处理
  49 + * @name :handleIdAndProjectId
  50 + * @author :lyh
  51 + * @method :post
  52 + * @time :2025/11/6 09:16
  53 + */
  54 + public function handleIdAndProjectId()
  55 + {
  56 + if(isset($this->param['id']) && !empty($this->param['id']) && !is_array($this->param['id'])){
  57 + if (preg_match('/^[A-Za-z]/', $this->param['id'])) {
  58 + $id = Cache::get('project_'.$this->param['id']);
  59 + if(empty($id)){
  60 + $projectModel = new Project();
  61 + $id = $projectModel->getValue(['post_id' => $this->param['id']],'id');
  62 + if(!empty($id)){
  63 + Cache::add('project_'.$this->param['id'], $id, 3600 * 12);
  64 + }
  65 + }
  66 + $this->param['id'] = $id;
  67 + }
  68 + }
  69 + if(isset($this->param['project_id']) && !empty($this->param['project_id']) && !is_array($this->param['project_id'])){
  70 + if (preg_match('/^[A-Za-z]/', $this->param['project_id'])) {
  71 + $id = Cache::get('project_'.$this->param['project_id']);
  72 + if(empty($id)){
  73 + $projectModel = new Project();
  74 + $id = $projectModel->getValue(['post_id' => $this->param['project_id']],'id');
  75 + if(!empty($id)){
  76 + Cache::add('project_'.$this->param['project_id'], $id, 3600 * 12);
  77 + }
  78 + }
  79 + $this->param['project_id'] = $id;
  80 + }
  81 + }
  82 + }
45 83
46 /** 84 /**
47 * @remark :请求参数处理 85 * @remark :请求参数处理
@@ -82,13 +82,15 @@ class GeoConfirmController extends BaseController @@ -82,13 +82,15 @@ class GeoConfirmController extends BaseController
82 public function saveInfo() 82 public function saveInfo()
83 { 83 {
84 $this->request->validate([ 84 $this->request->validate([
85 - 'id' => 'required', 85 + 'project_id'=>'required',
86 'confirm' => 'required', 86 'confirm' => 'required',
87 'confirm_num' => 'required', 87 'confirm_num' => 'required',
  88 + 'type' => 'required',
88 ], [ 89 ], [
89 - 'id.required' => '主键id不能为空', 90 + 'project_id.required' => '主键id不能为空',
90 'confirm.required' => '客户确认内容不能为空', 91 'confirm.required' => '客户确认内容不能为空',
91 'confirm_num.max' => '客户确认数量不能为空', 92 'confirm_num.max' => '客户确认数量不能为空',
  93 + 'type.max' => '类型不能为空',
92 ]); 94 ]);
93 $data = $this->logic->saveConfirmInfo(); 95 $data = $this->logic->saveConfirmInfo();
94 $this->response('success', Code::SUCCESS, $data); 96 $this->response('success', Code::SUCCESS, $data);
@@ -63,6 +63,7 @@ class OnlineController extends BaseController @@ -63,6 +63,7 @@ class OnlineController extends BaseController
63 'gl_project.title AS title', 63 'gl_project.title AS title',
64 'gl_project.channel AS channel', 64 'gl_project.channel AS channel',
65 'gl_project.type AS type', 65 'gl_project.type AS type',
  66 + 'gl_project.post_id AS post_id',
66 'gl_project.created_at AS created_at', 67 'gl_project.created_at AS created_at',
67 'gl_project.is_upgrade AS is_upgrade', 68 'gl_project.is_upgrade AS is_upgrade',
68 'gl_project_online_check.id AS online_check_id', 69 'gl_project_online_check.id AS online_check_id',
@@ -197,6 +197,7 @@ class OptimizeController extends BaseController @@ -197,6 +197,7 @@ class OptimizeController extends BaseController
197 'gl_project.level AS level', 197 'gl_project.level AS level',
198 'gl_project.channel AS channel', 198 'gl_project.channel AS channel',
199 'gl_project.company AS company', 199 'gl_project.company AS company',
  200 + 'gl_project.post_id AS post_id',
200 'gl_project.type AS type', 201 'gl_project.type AS type',
201 'gl_project.created_at AS created_at', 202 'gl_project.created_at AS created_at',
202 'gl_project.is_language AS is_language', 203 'gl_project.is_language AS is_language',
@@ -267,8 +268,10 @@ class OptimizeController extends BaseController @@ -267,8 +268,10 @@ class OptimizeController extends BaseController
267 $query = $query->where('gl_project.site_status',$this->map['site_status']); 268 $query = $query->where('gl_project.site_status',$this->map['site_status']);
268 } 269 }
269 if(isset($this->map['seo_plan'])){ 270 if(isset($this->map['seo_plan'])){
270 - if(is_array($this->map['seo_plan'])){  
271 - $query = $query->whereIn('gl_project_deploy_build.seo_plan',$this->map['seo_plan']); 271 + if($this->map['seo_plan'] == 0){
  272 + $query = $query->where('gl_project_deploy_build.plan','!=',0);
  273 + }elseif(is_array($this->map['seo_plan'])){
  274 + $query = $query->whereIn('gl_project_deploy_build.seo_plan',$this->map['seo_plan'])->where('gl_project_deploy_build.plan',0);
272 }else{ 275 }else{
273 $query = $query->where('gl_project_deploy_build.seo_plan',$this->map['seo_plan']); 276 $query = $query->where('gl_project_deploy_build.seo_plan',$this->map['seo_plan']);
274 } 277 }
@@ -289,7 +292,7 @@ class OptimizeController extends BaseController @@ -289,7 +292,7 @@ class OptimizeController extends BaseController
289 $query = $query->whereRaw("FIND_IN_SET(?, gl_project.level) > 0", [$this->map['level']]); 292 $query = $query->whereRaw("FIND_IN_SET(?, gl_project.level) > 0", [$this->map['level']]);
290 } 293 }
291 if(isset($this->map['online_updated_at']) && !empty($this->map['online_updated_at']) && is_array($this->map['online_updated_at'])){ 294 if(isset($this->map['online_updated_at']) && !empty($this->map['online_updated_at']) && is_array($this->map['online_updated_at'])){
292 - $query = $query->where('gl_project_deploy_optimize.start_date','>=' ,$this->map['online_updated_at'][0])->where('gl_project_deploy_optimize.start_date','<' ,$this->map['online_updated_at'][1]); 295 + $query = $query->where('gl_project_deploy_optimize.start_date','>=' ,$this->map['online_updated_at'][0])->where('gl_project_deploy_optimize.start_date','<=' ,$this->map['online_updated_at'][1]);
293 } 296 }
294 if(isset($this->map['special'])){ 297 if(isset($this->map['special'])){
295 $query = $query->whereRaw("FIND_IN_SET(?, gl_project_deploy_optimize.special) > 0", [$this->map['special']]); 298 $query = $query->whereRaw("FIND_IN_SET(?, gl_project_deploy_optimize.special) > 0", [$this->map['special']]);
@@ -96,6 +96,7 @@ class ProjectController extends BaseController @@ -96,6 +96,7 @@ class ProjectController extends BaseController
96 'gl_project.title AS title', 96 'gl_project.title AS title',
97 'gl_project.channel AS channel', 97 'gl_project.channel AS channel',
98 'gl_project.company AS company', 98 'gl_project.company AS company',
  99 + 'gl_project.post_id AS post_id',
99 'gl_project.type AS type', 100 'gl_project.type AS type',
100 'gl_project.project_type AS project_type', 101 'gl_project.project_type AS project_type',
101 'gl_project.extend_type AS extend_type', 102 'gl_project.extend_type AS extend_type',
@@ -512,7 +513,7 @@ class ProjectController extends BaseController @@ -512,7 +513,7 @@ class ProjectController extends BaseController
512 */ 513 */
513 public function info(ProjectLogic $logic) 514 public function info(ProjectLogic $logic)
514 { 515 {
515 - $data = $logic->getProjectInfo($this->param); 516 + $data = $logic->getProjectInfo();
516 $this->response('success', Code::SUCCESS, $data); 517 $this->response('success', Code::SUCCESS, $data);
517 } 518 }
518 519
@@ -32,7 +32,7 @@ class RenewProjectController extends BaseController @@ -32,7 +32,7 @@ class RenewProjectController extends BaseController
32 */ 32 */
33 public function lists(Project $project){ 33 public function lists(Project $project){
34 $map = $this->searchParam($this->map); 34 $map = $this->searchParam($this->map);
35 - $filed = ['id', 'title', 'type' ,'mysql_id' ,'channel','cooperate_date' ,'type', 'remain_day' ,'created_at','delete_status']; 35 + $filed = ['id', 'title', 'type' , 'post_id','mysql_id' ,'channel','cooperate_date' ,'type', 'remain_day' ,'created_at','delete_status'];
36 $lists = $project->formatQuery($map)->select($filed)->with('payment')->with('deploy_build') 36 $lists = $project->formatQuery($map)->select($filed)->with('payment')->with('deploy_build')
37 ->with('deploy_optimize')->with('online_check')->paginate($this->row, ['*'], 'page', $this->page); 37 ->with('deploy_optimize')->with('online_check')->paginate($this->row, ['*'], 'page', $this->page);
38 if(!empty($lists)){ 38 if(!empty($lists)){
@@ -5,6 +5,8 @@ namespace App\Http\Controllers\Bside\HomeCount; @@ -5,6 +5,8 @@ namespace App\Http\Controllers\Bside\HomeCount;
5 use App\Enums\Common\Code; 5 use App\Enums\Common\Code;
6 use App\Http\Controllers\Bside\BaseController; 6 use App\Http\Controllers\Bside\BaseController;
7 use App\Http\Logic\Bside\HomeCount\CountLogic; 7 use App\Http\Logic\Bside\HomeCount\CountLogic;
  8 +use App\Models\Project\Project;
  9 +
8 class CountController extends BaseController 10 class CountController extends BaseController
9 { 11 {
10 const STATUS_ERROR = 400; 12 const STATUS_ERROR = 400;
@@ -38,4 +40,16 @@ class CountController extends BaseController @@ -38,4 +40,16 @@ class CountController extends BaseController
38 $data['enterprise_service'] = $countLogic->enterprise_service(); 40 $data['enterprise_service'] = $countLogic->enterprise_service();
39 return $this->response('success',Code::SUCCESS,$data); 41 return $this->response('success',Code::SUCCESS,$data);
40 } 42 }
  43 +
  44 + /**
  45 + * @remark :
  46 + * @name :info5172count
  47 + * @author :lyh
  48 + * @method :post
  49 + * @time :2025/11/6 15:10
  50 + */
  51 + public function info5172count()
  52 + {
  53 +
  54 + }
41 } 55 }
@@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\SeoSetting; @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\SeoSetting;
12 use App\Enums\Common\Code; 12 use App\Enums\Common\Code;
13 use App\Http\Controllers\Bside\BaseController; 13 use App\Http\Controllers\Bside\BaseController;
14 use App\Http\Logic\Bside\SeoSetting\LinkDataLogic; 14 use App\Http\Logic\Bside\SeoSetting\LinkDataLogic;
  15 +use App\Models\Geo\GeoLink;
15 use App\Models\SeoSetting\LinkData; 16 use App\Models\SeoSetting\LinkData;
16 17
17 class LinkDataController extends BaseController 18 class LinkDataController extends BaseController
@@ -23,7 +24,11 @@ class LinkDataController extends BaseController @@ -23,7 +24,11 @@ class LinkDataController extends BaseController
23 * @method :post 24 * @method :post
24 * @time :2025/3/14 16:33 25 * @time :2025/3/14 16:33
25 */ 26 */
26 - public function lists(LinkData $linkData){ 27 + public function lists(GeoLink $linkData){
  28 + if(!isset($this->map['type']) || empty($this->map['type'])){
  29 + $this->map['type'] = $linkData::TYPE_LINK;
  30 + }
  31 + $this->map['project_id'] = $this->user['project_id'];
27 $lists = $linkData->lists($this->map,$this->page,$this->row); 32 $lists = $linkData->lists($this->map,$this->page,$this->row);
28 $this->response('success',Code::SUCCESS,$lists); 33 $this->response('success',Code::SUCCESS,$lists);
29 } 34 }
@@ -35,7 +40,7 @@ class LinkDataController extends BaseController @@ -35,7 +40,7 @@ class LinkDataController extends BaseController
35 * @method :post 40 * @method :post
36 * @time :2025/3/14 17:41 41 * @time :2025/3/14 17:41
37 */ 42 */
38 - public function info(LinkData $linkData){ 43 + public function info(GeoLink $linkData){
39 $this->request->validate([ 44 $this->request->validate([
40 'id'=>['required'], 45 'id'=>['required'],
41 ],[ 46 ],[
@@ -69,7 +74,7 @@ class LinkDataController extends BaseController @@ -69,7 +74,7 @@ class LinkDataController extends BaseController
69 * @method :post 74 * @method :post
70 * @time :2025/3/14 16:45 75 * @time :2025/3/14 16:45
71 */ 76 */
72 - public function del(LinkData $linkData){ 77 + public function del(GeoLink $linkData){
73 $this->request->validate([ 78 $this->request->validate([
74 'id'=>'required|array', 79 'id'=>'required|array',
75 ],[ 80 ],[
@@ -5,6 +5,7 @@ namespace App\Http\Logic\Aside; @@ -5,6 +5,7 @@ namespace App\Http\Logic\Aside;
5 5
6 use App\Enums\Common\Common; 6 use App\Enums\Common\Common;
7 use App\Http\Logic\Logic; 7 use App\Http\Logic\Logic;
  8 +use App\Models\Project\Project;
8 use Illuminate\Support\Facades\Cache; 9 use Illuminate\Support\Facades\Cache;
9 10
10 /** 11 /**
@@ -37,6 +38,45 @@ class BaseLogic extends Logic @@ -37,6 +38,45 @@ class BaseLogic extends Logic
37 */ 38 */
38 public function getParam(){ 39 public function getParam(){
39 $requestAll = $this->request->all(); 40 $requestAll = $this->request->all();
  41 + $requestAll = $this->handleIdAndProjectId($requestAll);
40 return $this->success($requestAll); 42 return $this->success($requestAll);
41 } 43 }
  44 +
  45 + /**
  46 + * @remark :处理project参数
  47 + * @name :handleIdAndProjectId
  48 + * @author :lyh
  49 + * @method :post
  50 + * @time :2025/11/6 10:41
  51 + */
  52 + public function handleIdAndProjectId($param)
  53 + {
  54 + if(isset($param['id']) && !empty($param['id']) && !is_array($param['id'])){
  55 + if (preg_match('/^[A-Za-z]/', $param['id'])) {
  56 + $id = Cache::get('project_'.$param['id']);
  57 + if(empty($id)){
  58 + $projectModel = new Project();
  59 + $id = $projectModel->getValue(['post_id' => $param['id']],'id');
  60 + if(!empty($id)){
  61 + Cache::add('project_'.$param['id'], $id, 3600 * 12);
  62 + }
  63 + }
  64 + $param['id'] = $id;
  65 + }
  66 + }
  67 + if(isset($param['project_id']) && !empty($param['project_id']) && !is_array($param['project_id'])){
  68 + if (preg_match('/^[A-Za-z]/', $param['project_id'])) {
  69 + $id = Cache::get('project_'.$param['project_id']);
  70 + if(empty($id)){
  71 + $projectModel = new Project();
  72 + $id = $projectModel->getValue(['post_id' => $param['project_id']],'id');
  73 + if(!empty($id)){
  74 + Cache::add('project_'.$param['project_id'], $id, 3600 * 12);
  75 + }
  76 + }
  77 + $param['project_id'] = $id;
  78 + }
  79 + }
  80 + return $param;
  81 + }
42 } 82 }
@@ -84,7 +84,13 @@ class GeoConfirmLogic extends BaseLogic @@ -84,7 +84,13 @@ class GeoConfirmLogic extends BaseLogic
84 public function saveConfirmInfo() 84 public function saveConfirmInfo()
85 { 85 {
86 $this->param['status'] = GeoConfirm::STATUS_FINISH; 86 $this->param['status'] = GeoConfirm::STATUS_FINISH;
87 - $this->model->edit($this->param,['id'=>$this->param['id']]);  
88 - return $this->success(['id'=>$this->param['id']]); 87 + $info = $this->model->read(['project_id' => $this->param['project_id'],'type'=>$this->param['type']]);
  88 + if($info === false){
  89 + $id = $this->model->addReturnId($this->param);
  90 + }else{
  91 + $id = $info['id'];
  92 + $this->model->edit($this->param,['id'=>$info['id']]);
  93 + }
  94 + return $this->success(['id'=>$id]);
89 } 95 }
90 } 96 }
@@ -39,11 +39,13 @@ class GeoLinkLogic extends BaseLogic @@ -39,11 +39,13 @@ class GeoLinkLogic extends BaseLogic
39 * @time :2025/7/14 16:47 39 * @time :2025/7/14 16:47
40 */ 40 */
41 public function getLinkList($map = [],$page = 1,$row = 20,$order = 'id'){ 41 public function getLinkList($map = [],$page = 1,$row = 20,$order = 'id'){
42 - $filed = ['*'];  
43 if(isset($map['url']) && !empty($map['url'])){ 42 if(isset($map['url']) && !empty($map['url'])){
44 $map['url'] = ['like','%'.$map['url'].'%']; 43 $map['url'] = ['like','%'.$map['url'].'%'];
45 } 44 }
46 - $lists = $this->model->lists($map,$page,$row,$order,$filed); 45 + if(!isset($map['type']) || empty($map['type'])){
  46 + $map['type'] = GeoLink::TYPE_NEWS;
  47 + }
  48 + $lists = $this->model->lists($map,$page,$row,$order,['*']);
47 return $this->success($lists); 49 return $this->success($lists);
48 } 50 }
49 51
@@ -121,10 +121,11 @@ class GeoLogic extends BaseLogic @@ -121,10 +121,11 @@ class GeoLogic extends BaseLogic
121 if(empty($geo_question_count)){ 121 if(empty($geo_question_count)){
122 $geo_question_count = 0; 122 $geo_question_count = 0;
123 } 123 }
124 - $geo_pr_count = GeoLink::where('project_id',$this->param['project_id'])->count(); 124 + $geo_pr_count = GeoLink::where('project_id',$this->param['project_id'])->where('type',GeoLink::TYPE_NEWS)->count();
  125 + $geo_link_count = GeoLink::where('project_id',$this->param['project_id'])->where('type',GeoLink::TYPE_LINK)->count();
125 $geo_writings_count = GeoWritings::where('project_id',$this->param['project_id'])->count(); 126 $geo_writings_count = GeoWritings::where('project_id',$this->param['project_id'])->count();
126 $geo_writings_count += GeoArticle::where('project_id',$this->param['project_id'])->count(); 127 $geo_writings_count += GeoArticle::where('project_id',$this->param['project_id'])->count();
127 - return $this->success(['geo_writings_count'=>$geo_writings_count,'geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count]); 128 + return $this->success(['geo_writings_count'=>$geo_writings_count,'geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count,'geo_link_count'=>$geo_link_count]);
128 } 129 }
129 130
130 } 131 }
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 namespace App\Http\Logic\Aside\Project; 10 namespace App\Http\Logic\Aside\Project;
11 11
12 use App\Http\Logic\Aside\BaseLogic; 12 use App\Http\Logic\Aside\BaseLogic;
  13 +use App\Models\Geo\GeoLink;
13 use App\Models\Project\EnterpriseProduct; 14 use App\Models\Project\EnterpriseProduct;
14 use App\Models\SeoSetting\LinkData; 15 use App\Models\SeoSetting\LinkData;
15 use App\Services\ProjectServer; 16 use App\Services\ProjectServer;
@@ -56,8 +57,7 @@ class EnterpriseProductLogic extends BaseLogic @@ -56,8 +57,7 @@ class EnterpriseProductLogic extends BaseLogic
56 * @time :2025/4/2 9:08 57 * @time :2025/4/2 9:08
57 */ 58 */
58 public function saveLinkData(){ 59 public function saveLinkData(){
59 - ProjectServer::useProject($this->param['project_id']);  
60 - $linkModel = new LinkData(); 60 + $linkModel = new GeoLink();
61 $data = []; 61 $data = [];
62 $count = count($this->param['data']); 62 $count = count($this->param['data']);
63 $error_num = 0; 63 $error_num = 0;
@@ -68,14 +68,15 @@ class EnterpriseProductLogic extends BaseLogic @@ -68,14 +68,15 @@ class EnterpriseProductLogic extends BaseLogic
68 } 68 }
69 $data[] = [ 69 $data[] = [
70 'url'=>$v['url'], 70 'url'=>$v['url'],
  71 + 'type'=>$linkModel::TYPE_LINK,
71 'da_values'=>$v['da_values'], 72 'da_values'=>$v['da_values'],
  73 + 'project_id'=>$this->param['project_id'],
72 'send_time'=>$v['send_time'] ?? date('Y-m-d H:i:s') 74 'send_time'=>$v['send_time'] ?? date('Y-m-d H:i:s')
73 ]; 75 ];
74 } 76 }
75 if(!empty($data)){ 77 if(!empty($data)){
76 $linkModel->insertAll($data); 78 $linkModel->insertAll($data);
77 } 79 }
78 - DB::disconnect('custom_mysql');  
79 return $this->success(['success'=>$count,'error'=>$error_num]); 80 return $this->success(['success'=>$count,'error'=>$error_num]);
80 } 81 }
81 } 82 }
@@ -11,6 +11,10 @@ namespace App\Http\Logic\Bside\Ai; @@ -11,6 +11,10 @@ namespace App\Http\Logic\Bside\Ai;
11 11
12 use App\Http\Logic\Bside\BaseLogic; 12 use App\Http\Logic\Bside\BaseLogic;
13 use App\Models\Ai\AiBlogKeyword; 13 use App\Models\Ai\AiBlogKeyword;
  14 +use App\Models\Project\ProjectKeyword;
  15 +use App\Models\WebSetting\WebSetting;
  16 +use App\Services\ProjectServer;
  17 +use Illuminate\Support\Facades\DB;
14 18
15 class AiBlogKeywordLogic extends BaseLogic 19 class AiBlogKeywordLogic extends BaseLogic
16 { 20 {
@@ -32,6 +36,22 @@ class AiBlogKeywordLogic extends BaseLogic @@ -32,6 +36,22 @@ class AiBlogKeywordLogic extends BaseLogic
32 public function getKeywordInfo() 36 public function getKeywordInfo()
33 { 37 {
34 $data = $this->model->read(['project_id'=>$this->user['project_id']]); 38 $data = $this->model->read(['project_id'=>$this->user['project_id']]);
  39 + if($data === false){
  40 + //核心关键词+网站关键词+白帽关键词
  41 + $main_keywords = ProjectKeyword::where('project_id', $this->user['project_id'])->value('main_keyword');
  42 + $main_keywords = explode("\r\n", $main_keywords);
  43 + $seo_keywords = ProjectKeyword::where('project_id', $this->user['project_id'])->value('seo_keywords');
  44 + $seo_keywords = explode("\r\n", $seo_keywords);
  45 + $site_keywords = WebSetting::where('project_id', $this->user['project_id'])->value('keyword');
  46 + $site_keywords = explode(",", $site_keywords);
  47 + $keywords = array_filter(array_merge($main_keywords, $site_keywords, $seo_keywords));
  48 + $keywords = array_map('trim', $keywords);
  49 + $keywords_string = implode("\n", $keywords);
  50 + $data = [
  51 + 'project_id'=>$this->user['project_id'],
  52 + 'keywords'=>$keywords_string
  53 + ];
  54 + }
35 return $this->success($data); 55 return $this->success($data);
36 } 56 }
37 57
@@ -24,6 +24,9 @@ class GeoQuestionResLogic extends BaseLogic @@ -24,6 +24,9 @@ class GeoQuestionResLogic extends BaseLogic
24 parent::__construct(); 24 parent::__construct();
25 $this->model = new GeoQuestionResult(); 25 $this->model = new GeoQuestionResult();
26 $this->param = $this->requestAll; 26 $this->param = $this->requestAll;
  27 + if($this->user['project_id'] == 5172){
  28 + $this->user['project_id'] = 3298;
  29 + }
27 } 30 }
28 31
29 /** 32 /**
@@ -16,6 +16,7 @@ use App\Models\Product\Product; @@ -16,6 +16,7 @@ use App\Models\Product\Product;
16 use App\Models\Project\Project; 16 use App\Models\Project\Project;
17 use App\Models\RankData\RankData as RankDataModel; 17 use App\Models\RankData\RankData as RankDataModel;
18 use App\Models\Service\Service; 18 use App\Models\Service\Service;
  19 +use App\Services\ProjectServer;
19 use Carbon\Carbon; 20 use Carbon\Carbon;
20 use Illuminate\Support\Facades\Cache; 21 use Illuminate\Support\Facades\Cache;
21 use Illuminate\Support\Facades\DB; 22 use Illuminate\Support\Facades\DB;
@@ -26,16 +27,20 @@ class CountLogic extends BaseLogic @@ -26,16 +27,20 @@ class CountLogic extends BaseLogic
26 { 27 {
27 parent::__construct(); 28 parent::__construct();
28 $this->model = new Count(); 29 $this->model = new Count();
  30 + if($this->user['project_id'] == 5172){
  31 + $this->user['project_id'] = 3298;
  32 + }
29 } 33 }
30 34
31 /** 35 /**
32 - * @name :(昨日统计数据)yesterday_count 36 + * @name :昨日统计数据 yesterday_count
33 * @author :lyh 37 * @author :lyh
34 * @method :post 38 * @method :post
35 * @time :2023/5/23 17:30 39 * @time :2023/5/23 17:30
36 */ 40 */
37 public function yesterday_count(){ 41 public function yesterday_count(){
38 $yesterday = Carbon::yesterday()->toDateString(); 42 $yesterday = Carbon::yesterday()->toDateString();
  43 +
39 $param = [ 44 $param = [
40 'date' => $yesterday, 45 'date' => $yesterday,
41 'project_id' => $this->user['project_id'] 46 'project_id' => $this->user['project_id']
@@ -86,6 +91,7 @@ class CountLogic extends BaseLogic @@ -86,6 +91,7 @@ class CountLogic extends BaseLogic
86 * @time :2023/5/24 13:33 91 * @time :2023/5/24 13:33
87 */ 92 */
88 public function total_count($inquiry_num = ''){ 93 public function total_count($inquiry_num = ''){
  94 + ProjectServer::useProject($this->user['project_id']);
89 $pv = (new VisitItem())->count(); 95 $pv = (new VisitItem())->count();
90 $ip = (new Visit())->count(); 96 $ip = (new Visit())->count();
91 $data = [ 97 $data = [
@@ -199,6 +205,7 @@ class CountLogic extends BaseLogic @@ -199,6 +205,7 @@ class CountLogic extends BaseLogic
199 * @time :2023/5/24 15:56 205 * @time :2023/5/24 15:56
200 */ 206 */
201 public function access_country_count(){ 207 public function access_country_count(){
  208 +
202 $customerVisitModel = new Visit(); 209 $customerVisitModel = new Visit();
203 $data = $customerVisitModel->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) 210 $data = $customerVisitModel->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
204 ->groupBy('country') 211 ->groupBy('country')
@@ -40,6 +40,15 @@ use Illuminate\Support\Str; @@ -40,6 +40,15 @@ use Illuminate\Support\Str;
40 class RankDataLogic extends BaseLogic 40 class RankDataLogic extends BaseLogic
41 { 41 {
42 42
  43 + public function __construct()
  44 + {
  45 + parent::__construct();
  46 + $this->param = $this->requestAll;
  47 + if($this->user['project_id'] == 5172){
  48 + $this->user['project_id'] = 3298;
  49 + }
  50 + }
  51 +
43 /** 52 /**
44 * 统计数据 53 * 统计数据
45 * @author zbj 54 * @author zbj
@@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\SeoSetting; @@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\SeoSetting;
11 11
12 use App\Http\Logic\Bside\BaseLogic; 12 use App\Http\Logic\Bside\BaseLogic;
13 use App\Models\Geo\DomainDa; 13 use App\Models\Geo\DomainDa;
  14 +use App\Models\Geo\GeoLink;
14 use App\Models\SeoSetting\LinkData; 15 use App\Models\SeoSetting\LinkData;
15 use App\Services\Geo\GeoService; 16 use App\Services\Geo\GeoService;
16 use Illuminate\Support\Carbon; 17 use Illuminate\Support\Carbon;
@@ -29,7 +30,7 @@ class LinkDataLogic extends BaseLogic @@ -29,7 +30,7 @@ class LinkDataLogic extends BaseLogic
29 { 30 {
30 parent::__construct(); 31 parent::__construct();
31 $this->param = $this->requestAll; 32 $this->param = $this->requestAll;
32 - $this->model = new LinkData(); 33 + $this->model = new GeoLink();
33 } 34 }
34 35
35 /** 36 /**
@@ -46,6 +47,8 @@ class LinkDataLogic extends BaseLogic @@ -46,6 +47,8 @@ class LinkDataLogic extends BaseLogic
46 $data[] = [ 47 $data[] = [
47 'url'=>$v['url'], 48 'url'=>$v['url'],
48 'da_values'=>$v['da_values'], 49 'da_values'=>$v['da_values'],
  50 + 'type'=>GeoLink::TYPE_LINK,
  51 + 'project_id'=>$this->user['project_id'],
49 'send_time'=>$v['send_time'] ?? date('Y-m-d H:i:s') 52 'send_time'=>$v['send_time'] ?? date('Y-m-d H:i:s')
50 ]; 53 ];
51 } 54 }
@@ -36,7 +36,9 @@ class GeoConf extends Base @@ -36,7 +36,9 @@ class GeoConf extends Base
36 if (empty($optimize)) { 36 if (empty($optimize)) {
37 $optimize = ManageHr::where(['status' => ManageHr::STATUS_ONE, 'entry_position' => 46])->pluck('name', 'id')->toArray(); 37 $optimize = ManageHr::where(['status' => ManageHr::STATUS_ONE, 'entry_position' => 46])->pluck('name', 'id')->toArray();
38 $optimize[11] = '陶婵'; 38 $optimize[11] = '陶婵';
  39 + $optimize[207] = '吴雨静';
39 $optimize[875] = '艾媛媛'; 40 $optimize[875] = '艾媛媛';
  41 + $optimize[893] = '杨汀';
40 ksort($optimize); 42 ksort($optimize);
41 Cache::put($key, $optimize, 3600); 43 Cache::put($key, $optimize, 3600);
42 } 44 }
@@ -20,5 +20,8 @@ use App\Models\Base; @@ -20,5 +20,8 @@ use App\Models\Base;
20 */ 20 */
21 class GeoLink extends Base 21 class GeoLink extends Base
22 { 22 {
  23 + const TYPE_NEWS = 1;//权威新闻
  24 + const TYPE_LINK = 2;//外链数据
  25 +
23 protected $table = 'gl_geo_link'; 26 protected $table = 'gl_geo_link';
24 } 27 }