Merge remote-tracking branch 'origin/master' into akun
正在显示
11 个修改的文件
包含
26 行增加
和
16 行删除
| @@ -122,7 +122,7 @@ class AiBlogAuthorId extends Command | @@ -122,7 +122,7 @@ class AiBlogAuthorId extends Command | ||
| 122 | if($servers_id == ServerConfig::SELF_SITE_ID){ | 122 | if($servers_id == ServerConfig::SELF_SITE_ID){ |
| 123 | //自建站服务器:如果项目已经上线,不请求C端接口,数据直接入库 | 123 | //自建站服务器:如果项目已经上线,不请求C端接口,数据直接入库 |
| 124 | $domain_model = new DomainInfo(); | 124 | $domain_model = new DomainInfo(); |
| 125 | - $domain_info = $domain_model->read(['project_id'=>$this->user['project_id']],['domain']); | 125 | + $domain_info = $domain_model->read(['project_id'=>$project_id],['domain']); |
| 126 | if($domain_info){ | 126 | if($domain_info){ |
| 127 | //判断是否已有更新进行中 | 127 | //判断是否已有更新进行中 |
| 128 | $notify_model = new Notify(); | 128 | $notify_model = new Notify(); |
| @@ -60,7 +60,7 @@ class AiBlogAutoPublish extends Command | @@ -60,7 +60,7 @@ class AiBlogAutoPublish extends Command | ||
| 60 | public function auto_publish() | 60 | public function auto_publish() |
| 61 | { | 61 | { |
| 62 | $this->output('开始自动发布博客文章'); | 62 | $this->output('开始自动发布博客文章'); |
| 63 | - $projects = Project::where('is_ai_blog', 1)->where('delete_status',0)->where('site_status',0)->where('extend_type',0)->get(); | 63 | + $projects = Project::where('is_ai_blog', 1)->whereIn('type',[1,2,3,4,6])->where('delete_status',0)->where('site_status',0)->where('extend_type',0)->get(); |
| 64 | foreach ($projects as $project) { | 64 | foreach ($projects as $project) { |
| 65 | try { | 65 | try { |
| 66 | $this->output("项目{$project->id}开始自动发布"); | 66 | $this->output("项目{$project->id}开始自动发布"); |
| @@ -73,7 +73,7 @@ class AiVideoAutoPublish extends Command | @@ -73,7 +73,7 @@ class AiVideoAutoPublish extends Command | ||
| 73 | $this->output('开始自动发布Video文章'); | 73 | $this->output('开始自动发布Video文章'); |
| 74 | $projectModel = new Project(); | 74 | $projectModel = new Project(); |
| 75 | $optimizeModel = new DeployOptimize(); | 75 | $optimizeModel = new DeployOptimize(); |
| 76 | - $projectList = $projectModel->list(['is_ai_video'=>1,'delete_status'=>0,'site_status'=>0,'extend_type'=>0],'id',['id','project_type']); | 76 | + $projectList = $projectModel->list(['is_ai_video'=>1,'type'=>['in',[1,2,3,4,6]],'delete_status'=>0,'site_status'=>0,'extend_type'=>0],'id',['id','project_type']); |
| 77 | foreach ($projectList as $item){ | 77 | foreach ($projectList as $item){ |
| 78 | $this->output("项目{$item['id']}开始自动发布"); | 78 | $this->output("项目{$item['id']}开始自动发布"); |
| 79 | //获取当前是否开启自动发布aiVideo | 79 | //获取当前是否开启自动发布aiVideo |
| @@ -43,7 +43,7 @@ class RemainDay extends Command | @@ -43,7 +43,7 @@ class RemainDay extends Command | ||
| 43 | * @var 暂停的项目 | 43 | * @var 暂停的项目 |
| 44 | */ | 44 | */ |
| 45 | protected $ceaseProjectId = [ | 45 | protected $ceaseProjectId = [ |
| 46 | - 354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3309 | 46 | + 354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685 |
| 47 | ];//需要单独处理的项目 | 47 | ];//需要单独处理的项目 |
| 48 | /** | 48 | /** |
| 49 | * The console command description. | 49 | * The console command description. |
| @@ -85,7 +85,7 @@ class TicketCount extends Command | @@ -85,7 +85,7 @@ class TicketCount extends Command | ||
| 85 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1])->sum('end_time'); | 85 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1])->sum('end_time'); |
| 86 | $complete_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]]); | 86 | $complete_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]]); |
| 87 | if(!empty($timeCount)){ | 87 | if(!empty($timeCount)){ |
| 88 | - $average_time = round($timeCount / $complete_num, 2); | 88 | + $average_time = round($timeCount / $complete_num, 3); |
| 89 | } | 89 | } |
| 90 | //最快完成的时间 | 90 | //最快完成的时间 |
| 91 | $fastest_time = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]])->min('end_time'); | 91 | $fastest_time = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]])->min('end_time'); |
| @@ -96,7 +96,7 @@ class TicketCount extends Command | @@ -96,7 +96,7 @@ class TicketCount extends Command | ||
| 96 | //超时工单数量 | 96 | //超时工单数量 |
| 97 | $timeout_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); | 97 | $timeout_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); |
| 98 | if(!empty($timeout_num)){ | 98 | if(!empty($timeout_num)){ |
| 99 | - $timeout_ratio = round($timeout_num / $ticket_num, 2); | 99 | + $timeout_ratio = round($timeout_num / $ticket_num, 3); |
| 100 | } | 100 | } |
| 101 | $data = [ | 101 | $data = [ |
| 102 | 'date'=>$date, | 102 | 'date'=>$date, |
| @@ -145,12 +145,12 @@ class TicketCount extends Command | @@ -145,12 +145,12 @@ class TicketCount extends Command | ||
| 145 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); | 145 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); |
| 146 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time'); | 146 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time'); |
| 147 | if(!empty($timeCount)){ | 147 | if(!empty($timeCount)){ |
| 148 | - $average_time = round($timeCount / $ticket_num, 2); | 148 | + $average_time = round($timeCount / $ticket_num, 3); |
| 149 | } | 149 | } |
| 150 | //超期工单数量 | 150 | //超期工单数量 |
| 151 | $timeout_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); | 151 | $timeout_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); |
| 152 | if(!empty($timeout_num)){ | 152 | if(!empty($timeout_num)){ |
| 153 | - $timeout_ratio = round($timeout_num / $ticket_num, 2); | 153 | + $timeout_ratio = round($timeout_num / $ticket_num, 3); |
| 154 | } | 154 | } |
| 155 | $data = [ | 155 | $data = [ |
| 156 | 'date'=>$date, | 156 | 'date'=>$date, |
| @@ -185,7 +185,7 @@ class TicketCount extends Command | @@ -185,7 +185,7 @@ class TicketCount extends Command | ||
| 185 | $time_end_num = $ticketModel->counts(['end_at'=>['!=',null]]);//已完成的工单 | 185 | $time_end_num = $ticketModel->counts(['end_at'=>['!=',null]]);//已完成的工单 |
| 186 | $time_end_count = $ticketModel->formatQuery(['end_at'=>['!=',null]])->sum('end_time');//已完成工单时长 | 186 | $time_end_count = $ticketModel->formatQuery(['end_at'=>['!=',null]])->sum('end_time');//已完成工单时长 |
| 187 | if(!empty($time_end_count)){ | 187 | if(!empty($time_end_count)){ |
| 188 | - $average_time = round($time_end_count / $time_end_num, 2); | 188 | + $average_time = round($time_end_count / $time_end_num, 3); |
| 189 | } | 189 | } |
| 190 | $add_num = $ticketModel->counts(['created_at'=>['between',[$date.' 00:00:00',$date.' 23:59:59']]]); | 190 | $add_num = $ticketModel->counts(['created_at'=>['between',[$date.' 00:00:00',$date.' 23:59:59']]]); |
| 191 | $untreated_num = $ticketModel->counts(['end_at'=>null]); | 191 | $untreated_num = $ticketModel->counts(['end_at'=>null]); |
| @@ -202,7 +202,7 @@ class TicketCount extends Command | @@ -202,7 +202,7 @@ class TicketCount extends Command | ||
| 202 | $timeout_num = $ticketModel->counts(['end_at'=>null,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); | 202 | $timeout_num = $ticketModel->counts(['end_at'=>null,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); |
| 203 | $timeout_ratio = null; | 203 | $timeout_ratio = null; |
| 204 | if(!empty($timeout_num)){ | 204 | if(!empty($timeout_num)){ |
| 205 | - $timeout_ratio = round($timeout_num / $ticket_num, 2); | 205 | + $timeout_ratio = round($timeout_num / $ticket_num, 3); |
| 206 | } | 206 | } |
| 207 | $data = [ | 207 | $data = [ |
| 208 | 'date' => $date, | 208 | 'date' => $date, |
| @@ -62,7 +62,10 @@ class ServersController extends BaseController | @@ -62,7 +62,10 @@ class ServersController extends BaseController | ||
| 62 | unset($this->map['project_name']); | 62 | unset($this->map['project_name']); |
| 63 | } | 63 | } |
| 64 | if(isset($this->map['domain']) && !empty($this->map['domain'])){ | 64 | if(isset($this->map['domain']) && !empty($this->map['domain'])){ |
| 65 | - $this->map['domain'] = parse_url($this->map['domain'], PHP_URL_HOST); // 直接取域名部分 | 65 | + $domain = parse_url($this->map['domain'], PHP_URL_HOST); // 直接取域名部分 |
| 66 | + if(!empty($domain)){ | ||
| 67 | + $this->map['domain'] = $domain; | ||
| 68 | + } | ||
| 66 | $domainModel = new DomainInfo(); | 69 | $domainModel = new DomainInfo(); |
| 67 | $domainInfo = $domainModel->read(['domain'=>['like','%'.$this->map['domain'].'%']],['id','project_id']); | 70 | $domainInfo = $domainModel->read(['domain'=>['like','%'.$this->map['domain'].'%']],['id','project_id']); |
| 68 | if($domainInfo !== false && !empty($domainInfo['project_id'])){ | 71 | if($domainInfo !== false && !empty($domainInfo['project_id'])){ |
| @@ -88,7 +88,7 @@ class AsideTicketLogController extends BaseController | @@ -88,7 +88,7 @@ class AsideTicketLogController extends BaseController | ||
| 88 | { | 88 | { |
| 89 | // 如果所有子任务都完成了,则将工单状态改为已完成 | 89 | // 如果所有子任务都完成了,则将工单状态改为已完成 |
| 90 | // todo 注意:建站期间的工单,所有人都完成后,不自动完成工单,需要项目经理验收修改工单状态 | 90 | // todo 注意:建站期间的工单,所有人都完成后,不自动完成工单,需要项目经理验收修改工单状态 |
| 91 | - if (!($ticket->project->status == 1 && in_array($ticket->project->project_cate, [1, 2]))) | 91 | + if (($ticket->title == 'GEO项目') || !($ticket->project->status == 1 && in_array($ticket->project->project_cate, [1, 2]))) |
| 92 | { | 92 | { |
| 93 | $ticket->status = Tickets::STATUS_COMPLETED; | 93 | $ticket->status = Tickets::STATUS_COMPLETED; |
| 94 | $ticket->end_at = now(); | 94 | $ticket->end_at = now(); |
| @@ -109,7 +109,7 @@ class AyrShareController extends BaseController | @@ -109,7 +109,7 @@ class AyrShareController extends BaseController | ||
| 109 | 'id.required' => 'ID不能为空' | 109 | 'id.required' => 'ID不能为空' |
| 110 | ]); | 110 | ]); |
| 111 | $info = $ayrShareLogic->ayr_share_info(); | 111 | $info = $ayrShareLogic->ayr_share_info(); |
| 112 | - if(!empty($info['title'])){ | 112 | + if(!empty($info['profile_key'])){ |
| 113 | $data = [ | 113 | $data = [ |
| 114 | // 'title'=>$info['title'], | 114 | // 'title'=>$info['title'], |
| 115 | 'profileKey'=>$info['profile_key'] | 115 | 'profileKey'=>$info['profile_key'] |
| @@ -88,11 +88,11 @@ class GeoLogic extends BaseLogic | @@ -88,11 +88,11 @@ class GeoLogic extends BaseLogic | ||
| 88 | $this->param['url'] = json_encode($this->param['url'] ?? [],true); | 88 | $this->param['url'] = json_encode($this->param['url'] ?? [],true); |
| 89 | $this->param['keywords'] = json_encode($this->param['keywords'] ?? [],true); | 89 | $this->param['keywords'] = json_encode($this->param['keywords'] ?? [],true); |
| 90 | //执行时间设置为今天 | 90 | //执行时间设置为今天 |
| 91 | - $this->param['next_time'] = date('Y-m-d'); | ||
| 92 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 91 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 93 | $id = $this->param['id']; | 92 | $id = $this->param['id']; |
| 94 | $this->model->edit($this->param,['id'=>$id]); | 93 | $this->model->edit($this->param,['id'=>$id]); |
| 95 | }else{ | 94 | }else{ |
| 95 | + $this->param['next_time'] = date('Y-m-d'); | ||
| 96 | $id = $this->model->addReturnId($this->param); | 96 | $id = $this->model->addReturnId($this->param); |
| 97 | } | 97 | } |
| 98 | return $this->success(['id'=>$id]); | 98 | return $this->success(['id'=>$id]); |
| @@ -90,12 +90,17 @@ class GeoQuestionResLogic extends BaseLogic | @@ -90,12 +90,17 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 90 | public function countQuantity(){ | 90 | public function countQuantity(){ |
| 91 | $questionModel = new GeoQuestion(); | 91 | $questionModel = new GeoQuestion(); |
| 92 | $list = $questionModel->list(['project_id'=>$this->user['project_id']],['question','keywords','url']); | 92 | $list = $questionModel->list(['project_id'=>$this->user['project_id']],['question','keywords','url']); |
| 93 | - $questionTotalCount = $urlTotalCount = $keywordsTotalCount = $keywordUrlCount = 0; | 93 | + $core_question_count = $questionTotalCount = $urlTotalCount = $keywordsTotalCount = 0; |
| 94 | $keywordArr = []; | 94 | $keywordArr = []; |
| 95 | $questionLogModel = new GeoQuestionLog(); | 95 | $questionLogModel = new GeoQuestionLog(); |
| 96 | $keywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0]]); | 96 | $keywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0]]); |
| 97 | + $coreKeywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'label'=>['like','%核心问题%'],'hit'=>['!=',0]]); | ||
| 97 | foreach ($list as $item){ | 98 | foreach ($list as $item){ |
| 98 | $questionTotalCount += count($item['question'] ?? []); | 99 | $questionTotalCount += count($item['question'] ?? []); |
| 100 | + //核心问题数 | ||
| 101 | + if(strpos($item['label'],'核心问题') !== false){ | ||
| 102 | + $core_question_count += count($item['question'] ?? []); | ||
| 103 | + } | ||
| 99 | $keywordsTotalCount += count($item['keywords'] ?? []); | 104 | $keywordsTotalCount += count($item['keywords'] ?? []); |
| 100 | $urlTotalCount += count($item['url'] ?? []); | 105 | $urlTotalCount += count($item['url'] ?? []); |
| 101 | foreach ($item['keywords'] as $keyWordItem){ | 106 | foreach ($item['keywords'] as $keyWordItem){ |
| @@ -110,6 +115,8 @@ class GeoQuestionResLogic extends BaseLogic | @@ -110,6 +115,8 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 110 | 'question_count'=>$questionTotalCount, | 115 | 'question_count'=>$questionTotalCount, |
| 111 | 'keywords_url_count'=>$keywordUrlCount, | 116 | 'keywords_url_count'=>$keywordUrlCount, |
| 112 | 'keywords_arr' => $keywordArr, | 117 | 'keywords_arr' => $keywordArr, |
| 118 | + 'core_question_count'=>$core_question_count, | ||
| 119 | + 'core_keyword_url_count'=>$coreKeywordUrlCount | ||
| 113 | ]; | 120 | ]; |
| 114 | return $this->success($data); | 121 | return $this->success($data); |
| 115 | } | 122 | } |
| @@ -555,7 +555,7 @@ class RankDataLogic extends BaseLogic | @@ -555,7 +555,7 @@ class RankDataLogic extends BaseLogic | ||
| 555 | $without_extension_project_ids = [658]; //是否达标只统计主词的 | 555 | $without_extension_project_ids = [658]; //是否达标只统计主词的 |
| 556 | $extension_project_ids = [354]; //扩展词也到达标的 | 556 | $extension_project_ids = [354]; //扩展词也到达标的 |
| 557 | $compliance_project_ids = [2163,257,823,1750,497]; //直接达标处理的 | 557 | $compliance_project_ids = [2163,257,823,1750,497]; //直接达标处理的 |
| 558 | - $ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685,3309];//暂停的项目 | 558 | + $ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685];//暂停的项目 |
| 559 | $uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目 | 559 | $uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目 |
| 560 | //一个项目多个api_no | 560 | //一个项目多个api_no |
| 561 | $multiple_api_no_project_ids = [ | 561 | $multiple_api_no_project_ids = [ |
-
请 注册 或 登录 后发表评论