作者 ZhengBing He

Merge remote-tracking branch 'origin/master' into workorder

正在显示 40 个修改的文件 包含 378 行增加133 行删除
... ... @@ -9,9 +9,14 @@
namespace App\Console\Commands\Ai;
use App\Helper\Arr;
use App\Models\Com\Notify;
use App\Models\Devops\ServerConfig;
use App\Models\Devops\ServersIp;
use App\Models\Domain\DomainInfo;
use App\Models\Project\AiBlogTask as AiBlogTaskModel;
use App\Models\Ai\AiBlogAuthor as AiBlogAuthorModel;
use App\Models\Project\Project;
use App\Services\AiBlogService;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
... ... @@ -105,18 +110,53 @@ class AiBlogAuthorId extends Command
* @time :2025/5/26 16:21
*/
public function sendCPost($project_id){
$domainModel = new DomainInfo();
$domain = $domainModel->getProjectIdDomain($project_id);
$c_url = $domain.'api/update_page/';
$param = [
'project_id' => $project_id,
'type' => 1,
'route' => 3,
'url' => $this->route,
'language'=> [],
'is_sitemap' => 0
];
$res = http_post($c_url, json_encode($param,true));
echo 'notify: project id: ' . $project_id . ', result: ' . json_encode($res,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
//获取项目所在服务器
$project_model = new Project();
$project_info = $project_model->read(['id'=>$project_id],['serve_id','is_upgrade', 'main_lang_id']);
if(!$project_info){
return false;
}
$serve_ip_model = new ServersIp();
$serve_ip_info = $serve_ip_model->read(['id'=>$project_info['serve_id']],['servers_id']);
$servers_id = $serve_ip_info ? $serve_ip_info['servers_id'] : 0;
if($servers_id == ServerConfig::SELF_SITE_ID){
//自建站服务器:如果项目已经上线,不请求C端接口,数据直接入库
$domain_model = new DomainInfo();
$domain_info = $domain_model->read(['project_id'=>$project_id],['domain']);
if($domain_info){
//判断是否已有更新进行中
$notify_model = new Notify();
$data = [
'project_id' => $project_id,
'type' => 1,
'route' => 3,
'server_id' => ServerConfig::SELF_SITE_ID,
'status' => ['!=',Notify::STATUS_FINISH_SITEMAP]
];
$notify = $notify_model->read($data,['id']);
if(!$notify){
$domain = $domain_info['domain'];
$data['data'] = Arr::a2s(['domain'=>$domain,'url'=>$this->route,'language'=>[]]);
$data['status'] = Notify::STATUS_INIT;
$data['is_pull_html_zip'] = Notify::IS_PULL_HTML_ZIP_FALSE;
$data['sort'] = 1;
$notify_model->add($data);
}
}
}else{
$domainModel = new DomainInfo();
$domain = $domainModel->getProjectIdDomain($project_id);
$c_url = $domain.'api/update_page/';
$param = [
'project_id' => $project_id,
'type' => 1,
'route' => 3,
'url' => $this->route,
'language'=> [],
'is_sitemap' => 0
];
$res = http_post($c_url, json_encode($param,true));
echo 'notify: project id: ' . $project_id . ', result: ' . json_encode($res,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}
}
}
... ...
... ... @@ -60,7 +60,7 @@ class AiBlogAutoPublish extends Command
public function auto_publish()
{
$this->output('开始自动发布博客文章');
$projects = Project::where('is_ai_blog', 1)->where('delete_status',0)->where('site_status',0)->where('extend_type',0)->get();
$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();
foreach ($projects as $project) {
try {
$this->output("项目{$project->id}开始自动发布");
... ... @@ -100,6 +100,9 @@ class AiBlogAutoPublish extends Command
//2、未达标的项目,开启AIblog, 并立即推送三篇;
//3、其他项目等下下周 1 (2025-03-17)开始推送第一篇, 之后按照正频率发送;
if (!$last_task) {
if(strpos($frequency[0],'/')){
$frequency = [1,1];//默认每天执行
}
if(!$compliance) {
for ($i = 0; $i < 3; $i++) {
$this->createTask($keywords, $project->id, $frequency);
... ... @@ -110,7 +113,18 @@ class AiBlogAutoPublish extends Command
}
}
} else {
$this->createTask($keywords, $project->id, $frequency);
if($frequency[0] == '1/2'){//一天2篇
$aiBlogTaskModel = new AiBlogTaskModel();
$frequency = explode('/', $frequency[0]);
//查询当前已发布几篇
$count = $aiBlogTaskModel->counts(['next_auto_date' => date('Y-m-d'),'project_id' => $project->id]);
while ($count < ($frequency[1] ?? 2)){
$this->createTask($keywords, $project->id, [$frequency[0],$frequency[0]]);
$count++;
}
}else{
$this->createTask($keywords, $project->id, $frequency);
}
}
}catch (\Exception $e){
(new DingService())->handle([
... ... @@ -133,7 +147,7 @@ class AiBlogAutoPublish extends Command
$result = $aiBlogService->createTask($keyword);
if ($result['status'] == 200) {
$aiBlogTaskModel = new AiBlogTaskModel();
$next_auto_date = date('Y-m-d', strtotime('+' . mt_rand($frequency[0],$frequency[1]) . 'days')); //每3-6天自动发布
$next_auto_date = date('Y-m-d', strtotime('+' . mt_rand($frequency[0] ?? 3, $frequency[1] ?? 6) . 'days')); //每3-6天自动发布
$aiBlogTaskModel->addReturnId(['project_id' => $project_id, 'type' => 2, 'task_id' => $result['data']['task_id'], 'status' => 1, 'next_auto_date' => $next_auto_date]);
ProjectServer::useProject($project_id);
$aiBlogModel = new AiBlog();
... ... @@ -141,7 +155,6 @@ class AiBlogAutoPublish extends Command
$end = strtotime('16:00:00');
$randomTimestamp = mt_rand($start, $end);
$created_at = date("Y-m-d H:i:s", $randomTimestamp);
$aiBlogModel->addReturnId(['keyword' => $keyword, 'status' => 1, 'task_id' => $result['data']['task_id'], 'project_id' => $project_id, 'created_at' => $created_at]);
DB::disconnect('custom_mysql');
$this->output("任务创建成功");
... ...
... ... @@ -73,7 +73,7 @@ class AiVideoAutoPublish extends Command
$this->output('开始自动发布Video文章');
$projectModel = new Project();
$optimizeModel = new DeployOptimize();
$projectList = $projectModel->list(['is_ai_video'=>1,'delete_status'=>0,'site_status'=>0,'extend_type'=>0],'id',['id','project_type']);
$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']);
foreach ($projectList as $item){
$this->output("项目{$item['id']}开始自动发布");
//获取当前是否开启自动发布aiVideo
... ... @@ -241,7 +241,7 @@ class AiVideoAutoPublish extends Command
$storage = $aiVideoTaskModel->videoSetting()[$video_setting ?? 1];
$frequency = $aiVideoTaskModel->videoFrequency()[$frequency_setting ?? 1];
$frequencyArr = explode('-',$frequency);
$result = $aiVideoService->createTask($info['title'],$info['remark'],$info['images'],[],$storage);
$result = $aiVideoService->createTask($info['title'],$info['remark'],array_slice($info['images'], 0, 8),[],$storage);
if($result['status'] == 200){
$next_auto_date = date('Y-m-d', strtotime('+' . mt_rand($frequencyArr[0] ?? 5,$frequencyArr[1] ?? 7) . 'days')); //每5-7天自动发布
$aiVideoTaskModel->addReturnId(['next_auto_date'=>$next_auto_date,'task_id'=>$result['data']['task_id'],'project_id'=>$info['project_id'],'storage'=>$storage]);
... ... @@ -250,6 +250,8 @@ class AiVideoAutoPublish extends Command
$aiVideoModel->addReturnId(['title'=>$info['title'],'task_id'=>$result['data']['task_id'],'description'=>$info['remark'],'project_id'=>$info['project_id'],'images'=>json_encode($info['images'],true),'anchor'=>json_encode([],true)]);
DB::disconnect('custom_mysql');
$aiVideoAutoLogModel->edit(['status'=>2],['id'=>$info['id']]);
}else{
$aiVideoAutoLogModel->edit(['status'=>3],['id'=>$info['id']]);
}
}catch (\Exception $e){
$this->output( date('Y-m-d H:i:s').':当前数据不存在或已被删除'.$task_id);
... ...
... ... @@ -36,12 +36,11 @@ class DomainInfo extends Command
*/
protected $description = '域名相关';
private $domains = [];
/**
* @remark :更新证书+证书有效时间
* @name :handle
* @author :lyh
* @method :post
* @time :2023/9/11 15:09
* 更新证书+证书有效时间
* @return bool
*/
public function handle()
{
... ... @@ -57,6 +56,9 @@ class DomainInfo extends Command
//创建的自定义小语种域名证书到期更新
$this->startUpdateCustomCert();
// 推送v5项目域名到期信息
$this->domainChatMessageV5();
return true;
}
... ... @@ -100,13 +102,13 @@ class DomainInfo extends Command
$v->domain_start_time = $valid_time['start'];
$v->domain_end_time = $valid_time['end'];
$v->save();
}
}
//域名到期提醒
if ($v->domain_end_time && $v->domain_end_time < $end_day) {
$is_end = $v->domain_end_time < date('Y-m-d H:i:s') ? 1 : 0;
$this->domainChatMessage($v['project_id'], $v['id'], $v['domain'], $is_end);
//域名到期提醒
if ($v['is_expire_remind'] && $valid_time['end'] < $end_day) {
$is_end = $valid_time['end'] < date('Y-m-d H:i:s') ? 1 : 0;
$this->domainChatMessage($v['project_id'], $v['id'], $v['domain'], $is_end);
}
}
}
} else {
//除自建站项目外,记录已解析到别的ip的域名
... ... @@ -141,13 +143,13 @@ class DomainInfo extends Command
$v->domain_start_time = $valid_time['start'];
$v->domain_end_time = $valid_time['end'];
$v->save();
}
}
//域名到期提醒
if ($v->domain_end_time && $v->domain_end_time < $end_day) {
$is_end = $v->domain_end_time < date('Y-m-d H:i:s') ? 1 : 0;
$this->domainChatMessage($v['project_id'], $v['id'], $v['domain'], $is_end);
//域名到期提醒
if ($v['is_expire_remind'] && $valid_time['end'] < $end_day) {
$is_end = $valid_time['end'] < date('Y-m-d H:i:s') ? 1 : 0;
$this->domainChatMessage($v['project_id'], $v['id'], $v['domain'], $is_end);
}
}
}
if ($v['amp_status'] == 1) {
... ... @@ -401,19 +403,28 @@ class DomainInfo extends Command
* @param $domain_id
* @param $domain
* @param $is_end
* @return bool
* @author Akun
* @date 2025/08/14 9:56
*/
public function domainChatMessage($project_id, $domain_id, $domain, $is_end)
{
//每周一推送
$week_day = date('w');
if ($week_day != 1) {
return true;
}
//项目是否有绑定群
$friend_id = ProjectAssociation::where('project_id', $project_id)
->where('status', ProjectAssociation::STATUS_NORMAL)
->where('binding_app', ProjectAssociation::ENTERPRISE_WECHAT)
->value('friend_id');
if ($friend_id) {
$tips = $is_end ? ' 已经到期' : ' 即将到期';
$message = '【域名到期提醒】' . PHP_EOL . '域名 ' . $domain . $tips . ',请及时处理。';
$top_domain = getTopDomain($domain);
$this->domains[] = $top_domain;
$tips = $is_end ? ' 已经到期,请及时处理。' : ' 有效期不足一个月,请留意。';
$message = '【域名到期提醒】' . PHP_EOL . '域名 ' . $top_domain . $tips;
$param = [
'project_id' => $project_id,
'friend_id' => $friend_id,
... ... @@ -427,5 +438,55 @@ class DomainInfo extends Command
$messagePushModel = new MessagePush();
$messagePushModel->add($param);
}
return true;
}
/**
* 推送v5 项目域名到期时间
* @return bool
*/
public function domainChatMessageV5()
{
//每周一推送
$week_day = date('w');
if ($week_day != 1) {
return true;
}
$domain_json = @file_get_contents('https://www.quanqiusou.cn/extend_api/aicc/domain_expire_lists.php');
$domains = json_decode($domain_json, true);
if (empty($domains))
return true;
$send_domain = $this->domains;
$today = date('Y-m-d');
$messagePushModel = new MessagePush();
foreach ($domains as $item) {
if (empty($item['domain']) || empty($item['friend_id'])) {
continue;
}
// 避免重复推送域名到期提示
if (in_array($item['domain'], $send_domain)) {
continue;
} else {
array_push($send_domain, $item['domain']);
}
$tips = $item['end_at'] >= $today ? ' 有效期不足一个月,请留意。' : ' 已经到期,请及时处理。';
$message = '【域名到期提醒】' . PHP_EOL . '域名 ' . $item['domain'] . $tips;
$param = [
'project_id' => $item['project_id'],
'friend_id' => $item['friend_id'],
'type' => MessagePush::TYPE_DOMAIN_V5,
'content' => $message,
'ref_ids' => 0,
'send_time' => date('Y-m-d 15:00:00'),
'status' => 0,
];
//写入一条推送消息 自动消费
$messagePushModel->add($param);
}
return true;
}
}
... ...
... ... @@ -35,7 +35,7 @@ class RemainDay extends Command
* 按照达标天数收费的项目(白帽)
*/
protected $bm_projectId = [
4247,4299,4310,4215,4038,4084,4148,4178
4247,4299,4310,4215,4038,4084,4148,4178,4405
];
... ... @@ -43,7 +43,7 @@ class RemainDay extends Command
* @var 暂停的项目
*/
protected $ceaseProjectId = [
354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3309
354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685
];//需要单独处理的项目
/**
* The console command description.
... ... @@ -120,7 +120,7 @@ class RemainDay extends Command
//白帽版本的系统
if($deploy_build['seo_plan'] == 1){
if($deploy_build['seo_service_duration'] != 0){
if(in_array($item['id'],$this->bm_projectId) || (strpos($item['level'], '19') !== false)){
if(in_array($item['id'],$this->bm_projectId) || (in_array( 19,$item['level']))){
$compliance_day = (int)$item['bm_finish_remain_day'];
$seo_remain_day = $deploy_build['seo_service_duration'] - (int)$item['bm_finish_remain_day'];
}else{
... ...
... ... @@ -61,7 +61,7 @@ class GeoQuestionRes extends Command
$geoQuestionModel->edit(['status'=>$geoQuestionModel::STATUS_CLOSE],['id'=>$task_id]);
continue;
}
if(empty($taskInfo['question']) || empty($taskInfo['keywords']) || empty($taskInfo['url'])){
if(empty($taskInfo['question']) || (empty($taskInfo['keywords']) && empty($taskInfo['url']) && empty($taskInfo['expect_result']))){
$this->output('task id: ' . $task_id . ', error: 任务数据缺失, continue!');
$geoQuestionModel->edit(['status'=>$geoQuestionModel::STATUS_CLOSE],['id'=>$task_id]);
continue;
... ... @@ -113,7 +113,6 @@ class GeoQuestionRes extends Command
}
// 命中文案
$hit_data[] = $result['text'];
if(!empty($result['annotations'])){
$url = array_column(array_column($result['annotations'], 'url_citation'), 'url');
$title = array_column(array_column($result['annotations'], 'url_citation'), 'title');
... ... @@ -165,6 +164,7 @@ class GeoQuestionRes extends Command
'keywords_num'=>$keyword_num ?? [],
'url_num'=>$url_num ?? [],
'is_match'=>$is_match ?? 0,
'label'=>$taskInfo['label'] ?? null,
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s'),
];
... ...
... ... @@ -68,9 +68,7 @@ class UpdateRoute extends Command
*/
public function handle()
{
ProjectServer::useProject(4132);
return $this->product_action(4132);
DB::disconnect('custom_mysql');
return $this->_action();
}
/**
... ... @@ -156,12 +154,17 @@ class UpdateRoute extends Command
*/
public function _action(){
$projectModel = new Project();
$lists = $projectModel->list(['delete_status'=>0,'extend_type'=>0,'type'=>['!=',0]],'id',['id']);
$keywordModel = new Keyword();
$lists = $projectModel->list(['id'=>['in',[4379,4380,4381,4382,4383]],'delete_status'=>0,'extend_type'=>0,'type'=>['!=',0]],'id',['id']);
foreach ($lists as $v){
ProjectServer::useProject($v['id']);
echo date('Y-m-d H:i:s').' 执行的项目id:'.$v['id'].PHP_EOL;
$keywordModel->edit(['type'=>1],['id'=>['!=',0]]);
$productModel = new Product();
$productModel->edit(['project_id'=>$v['id']],['id'=>['!=',0]]);
$productLists = $productModel->list([],'id',['id','title','route']);
foreach ($productLists as $item){
$route = RouteMap::setRoute($item['route'],'product',$item['id'],$v['id']);
$productModel->edit(['route'=>$route],['id'=>$item['id']]);
}
DB::disconnect('custom_mysql');
}
return true;
... ...
... ... @@ -50,7 +50,7 @@ class lyhDemo extends Command
protected $description = '更新路由';
public function handle(){
return $this->getExpectResult();
return $this->_actionRoute();
return true;
}
... ... @@ -74,25 +74,22 @@ class lyhDemo extends Command
* @time :2025/7/22 15:14
*/
public function _actionRoute(){
$geo_service = new GeoService();
$data = $geo_service->getDeepSeekResult("创贸总共多少人?",'gpt-4o-mini');
$projectModel = new Project();
$lists = $projectModel->list(['delete_status' => 0,'is_ai_blog'=>1,'project_type'=>0,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id', ['id']);
$data = [];
foreach ($lists as $item){
echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL;
ProjectServer::useProject($item['id']);
$aiBlogModel = new AiBlog();
$info = $aiBlogModel->read(['text'=>['like','%href="blog/%']],['id']);
if($info !== false){
echo '需要处理->项目id:'.$item['id'].PHP_EOL;
$data[] = $item['id'];
}
echo 'end';
DB::disconnect('custom_mysql');
}
dd($data);
// $projectModel = new Project();
// $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']);
// $data = [];
// foreach ($lists as $item){
// echo date('Y-m-d H:i:s') . '开始--项目的id:'. $item['id'] . PHP_EOL;
// ProjectServer::useProject($item['id']);
// $aiBlogModel = new AiBlog();
// $info = $aiBlogModel->read(['route'=>null],['id']);
// if($info !== false){
// echo '项目id:'.$item['id'].PHP_EOL;
// $data[] = $item['id'];
// }
// dd($data);
// echo 'end';
// DB::disconnect('custom_mysql');
// }
}
public function _actionTemplateMain(){
... ...
... ... @@ -55,7 +55,7 @@ class RankData extends BaseCommands
->where('gl_project.delete_status',0)
->where('gl_project_deploy_optimize.api_no', '>', 0)
->whereIn('gl_project.type',[2,4])
->whereRaw("FIND_IN_SET('2', gl_project.level) = 0 AND FIND_IN_SET('3', gl_project.level) = 0")
->whereRaw("FIND_IN_SET('2', gl_project.level) = 0")
->select(['gl_project_deploy_optimize.api_no as api_no', 'gl_project_deploy_optimize.project_id as project_id'])
->orderBy('gl_project.id', 'asc')
->get()->toArray();
... ... @@ -83,7 +83,7 @@ class RankData extends BaseCommands
//白帽SEO版
$list = Project::leftJoin('gl_project_deploy_build', 'gl_project.id', '=', 'gl_project_deploy_build.project_id')
->where('gl_project.delete_status',0)
->where('gl_project_deploy_build.seo_plan', 1)
->where('gl_project_deploy_build.seo_plan', '>', 0)
->whereIn('gl_project.type',[2,3,4])
->orderBy('gl_project.id', 'asc')
->pluck('gl_project.id')->toArray();
... ...
... ... @@ -76,31 +76,39 @@ class TicketCount extends Command
$date = Carbon::yesterday()->toDateString(); // 昨日时间
$ticketManageCountModel = new TicketDailyManageCount();
foreach ($manageList as $item){
$average_time = '';
$average_time = null;
$timeout_ratio = null;
$this->output('按人员统计:执行的人员名称/id:'.$item['name'].'/'.$item['manage_id']);
$ticketLogModel = new TicketLog();
$ticket_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1]);
//工单总时长
$timeCount = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1])->sum('end_time');
$ticket_end_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]]);
$complete_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]]);
if(!empty($timeCount)){
$average_time = round($timeCount / $ticket_end_num, 2);
$average_time = round($timeCount / $complete_num, 3);
}
//最快完成的时间
$fastest_time = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]])->min('end_time');
//最快完成时间
if(!$fastest_time){
$fastest_time = null;
}
//超时工单数量
$timeout_num = $ticketLogModel->counts(['end_at'=>null,'engineer_id'=>$item['manage_id'],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]);
$complete_num = $ticketLogModel->counts(['end_at'=>['!=',null],'engineer_id'=>$item['manage_id'],'is_engineer'=>1]);
$timeout_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]);
if(!empty($timeout_num)){
$timeout_ratio = round($timeout_num / $ticket_num, 3);
}
$data = [
'date'=>$date,
'manage_id'=>$item['id'],
'manage_name'=>$item['name'],
'ticket_num'=>$ticket_num,//工单总数量
'average_time'=>$average_time ?? '',//平均完成工单时长
'fastest_time'=>$fastest_time,//最快完成工单时间
'average_time'=>$average_time ?? null,//平均完成工单时长
'fastest_time'=>$fastest_time ?? null,//最快完成工单时间
'timeout_num'=>$timeout_num,//超时工单数量
'complete_num'=>$complete_num,//完成工单数量
'dept_id'=>$item['dept_id']
'dept_id'=>$item['dept_id'],
'timeout_ratio'=>$timeout_ratio ?? null
];
//查询当前用户是否当日已有记录
$ticketManageInfo = $ticketManageCountModel->read(['date'=>$date,'manage_id'=>$item['id']],['id']);
... ... @@ -130,20 +138,28 @@ class TicketCount extends Command
$ticketDailyDeptModel = new TicketDailyDeptCount();
$date = Carbon::yesterday()->toDateString(); // "2025-08-07"
foreach ($groupList as $item){
$average_time = '';
$average_time = null;
$timeout_ratio = null;
$this->output('组统计:执行的组/id:'.$item['name'].'/'.$item['id']);
$manageIdArr = $manageHrModel->selectField(['belong_group'=>$item['id'],'status'=>1,'dept_id'=>1],'manage_id');
$ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]);
$timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time');
if(!empty($timeCount)){
$average_time = round($timeCount / $ticket_num, 2);
$average_time = round($timeCount / $ticket_num, 3);
}
//超期工单数量
$timeout_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]);
if(!empty($timeout_num)){
$timeout_ratio = round($timeout_num / $ticket_num, 3);
}
$data = [
'date'=>$date,
'dept_id'=>$item['id'],
'dept_name'=>$item['name'],
'ticket_num'=>$ticket_num ?? 0,
'average_time'=>$average_time ?? ''
'average_time'=>$average_time ?? null,
'timeout_ratio'=>$timeout_ratio ?? null,
'timeout_num'=>$timeout_num
];
$deptInfo = $ticketDailyDeptModel->read(['date'=>$date,'dept_id'=>$item['id']],['id']);
if($deptInfo === false){
... ... @@ -169,7 +185,7 @@ class TicketCount extends Command
$time_end_num = $ticketModel->counts(['end_at'=>['!=',null]]);//已完成的工单
$time_end_count = $ticketModel->formatQuery(['end_at'=>['!=',null]])->sum('end_time');//已完成工单时长
if(!empty($time_end_count)){
$average_time = round($time_end_count / $time_end_num, 2);
$average_time = round($time_end_count / $time_end_num, 3);
}
$add_num = $ticketModel->counts(['created_at'=>['between',[$date.' 00:00:00',$date.' 23:59:59']]]);
$untreated_num = $ticketModel->counts(['end_at'=>null]);
... ... @@ -183,15 +199,22 @@ class TicketCount extends Command
)
->groupBy('p.project_cate')
->pluck('ticket_count', 'project_cate');
$timeout_num = $ticketModel->counts(['end_at'=>null,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]);
$timeout_ratio = null;
if(!empty($timeout_num)){
$timeout_ratio = round($timeout_num / $ticket_num, 3);
}
$data = [
'date' => $date,
'ticket_num'=>$ticket_num,
'add_num'=>$add_num,
'untreated_num'=>$untreated_num,
'processed_num'=>$processed_num,
'average_time'=>$average_time ?? '',
'average_time'=>$average_time ?? null,
'source'=>json_encode(['a'=>$submit_a_side,'b'=>$submit_b_side],true),
'source_type'=>json_encode($dbResult,true)
'source_type'=>json_encode($dbResult,true),
'timeout_num'=>$timeout_num,
'timeout_ratio'=>$timeout_ratio ?? null
];
$ticketDailyModel = new TicketDailyCount();
$ticketDailyInfo = $ticketDailyModel->read(['date'=>$date],['id']);
... ...
... ... @@ -435,6 +435,7 @@ class WebTraffic extends Command
}
})->inRandomOrder()->first();
if(!$ipdata){
$data[] = [];
continue;
}
$ipdata = (array)$ipdata ?: [];
... ...
... ... @@ -480,6 +480,7 @@ class WebTrafficRussia extends Command
$ip_area = $this->get_rand($project_country);
$res = DB::table('gl_xunpan_ipdata')->where('ip_area', $ip_area)->inRandomOrder()->first();
if(!$res){
$data[] = [];
continue;
}
$res = (array)$res ?: [];
... ...
... ... @@ -471,6 +471,7 @@ class WebTrafficRussiaSpecial extends Command
$ip_area = $this->get_rand($project_country);
$res = DB::table('gl_xunpan_ipdata')->where('ip_area', $ip_area)->inRandomOrder()->first();
if(!$res){
$data[] = [];
continue;
}
$res = (array)$res ?: [];
... ...
... ... @@ -421,6 +421,7 @@ class WebTrafficSpecial extends Command
}
})->inRandomOrder()->first();
if(!$ipdata){
$data[] = [];
continue;
}
$ipdata = (array)$ipdata ?: [];
... ...
... ... @@ -12,6 +12,7 @@ use App\Http\Logic\Bside\User\UserLoginLogic;
use App\Models\Ai\AiBlog;
use App\Models\Blog\Blog;
use App\Models\Domain\DomainInfo;
use App\Models\Industry\ProjectIndustryRelated;
use App\Models\Inquiry\InquiryRelateDomain;
use App\Models\Manage\ManageHr;
use App\Models\News\News;
... ... @@ -47,10 +48,12 @@ class PrivateController extends BaseController
public function optimizeProjectList(Request $request)
{
$page_size = $request->input('page_size', 20);
$field = ['gl_project.id', 'gl_project.company', 'gl_project.is_upgrade', 'b.start_date', 'd.domain', 'b.special'];
$field = ['gl_project.id', 'gl_project.company', 'gl_project.is_upgrade', 'b.start_date', 'd.domain', 'b.special', 'gl_project.from_order_id'];// 'f.industry_name',
$result = Project::select($field)->leftJoin('gl_project_deploy_optimize as b', 'gl_project.id', '=', 'b.project_id')
->leftJoin('gl_project_online_check as c', 'gl_project.id', '=', 'c.project_id')
->leftJoin('gl_domain_info as d', 'gl_project.id', '=', 'd.project_id')
// ->leftJoin('gl_project_industry_related as e', 'gl_project.id', '=', 'e.project_id')
// ->leftJoin('gl_project_industry as f', 'e.industry_id', '=', 'f.id')
->where('gl_project.type', Project::TYPE_TWO)
->where('gl_project.project_type',Project::TYPE_ZERO)
->where('gl_project.extend_type', 0) // 是否续费是由extend_type字段控制
... ... @@ -60,6 +63,14 @@ class PrivateController extends BaseController
})
->paginate($page_size)
->toArray();
// 直接关联查询, 会出现数据错误
$project_ids = array_column($result['list'], 'id');
$industry = ProjectIndustryRelated::leftJoin('gl_project_industry', 'gl_project_industry_related.industry_id', '=', 'gl_project_industry.id')->whereIn('project_id', $project_ids)->pluck('industry_name', 'project_id')->toArray();
foreach ($result['list'] as &$val) {
$val['industry_name'] = FALSE == empty($industry[$val['id']]) ? $industry[$val['id']] : '';
}
return $this->success($result);
}
... ...
... ... @@ -62,6 +62,10 @@ class ServersController extends BaseController
unset($this->map['project_name']);
}
if(isset($this->map['domain']) && !empty($this->map['domain'])){
$domain = parse_url($this->map['domain'], PHP_URL_HOST); // 直接取域名部分
if(!empty($domain)){
$this->map['domain'] = $domain;
}
$domainModel = new DomainInfo();
$domainInfo = $domainModel->read(['domain'=>['like','%'.$this->map['domain'].'%']],['id','project_id']);
if($domainInfo !== false && !empty($domainInfo['project_id'])){
... ... @@ -74,6 +78,8 @@ class ServersController extends BaseController
$this->map['id'] = $ipInfo['servers_id'];
}
}
}else{
$this->map['id'] = 0;
}
unset($this->map['domain']);
}
... ...
... ... @@ -96,17 +96,13 @@ class GeoQuestionController extends BaseController
$this->request->validate([
'project_id'=>'required',
'question'=>'required',
'keywords'=>'required',
'url'=>'required',
'status'=>'required',
'type'=>'required',
],[
'project_id.required' => '项目ID不能为空',
'question.required' => '项目ID不能为空',
'keywords.required' => '项目ID不能为空',
'url.required' => '项目ID不能为空',
'status.required' => '项目ID不能为空',
'type.required' => '类型不能为空',
'question.required' => 'question不能为空',
'status.required' => 'status不能为空',
'type.required' => 'type类型不能为空',
]);
$data = $this->logic->saveGeoQuestion();
$this->response('success',Code::SUCCESS,$data);
... ...
... ... @@ -525,6 +525,39 @@ class OptimizeController extends BaseController
}
/**
* @remark :获取聚合页链接数据
* @name :getKeywordRouteList
* @author :lyh
* @method :post
* @time :2025/8/22 15:02
*/
public function getKeywordRouteList(){
$this->request->validate([
'project_id' => 'required',
], [
'project_id.required' => 'project_id不能为空',
]);
// 获取当前网站正式域名
$domainModel = new DomainInfo();
$domainInfo = $domainModel->read(['project_id' => $this->param['project_id']], ['domain']);
if ($domainInfo === false) {
$this->fail('请先设置域名');
}
$domain = 'https://' . $domainInfo['domain'] . '/';
ProjectServer::useProject($this->param['project_id']);
$productKeywordModel = new Keyword();
$data = [];
$lists = $productKeywordModel->list(['route'=>['!=',null]],'id',['id','route','seo_title']);
if (!empty($lists)){
foreach ($lists as $item){
$data[] = $domain . $item['route'] . '/{' . $item['seo_title'] . '}';
}
}
DB::disconnect('custom_mysql');
$this->response('success', Code::SUCCESS, $data);
}
/**
* @remark :分片查询
* @name :processChunkedList
* @author :lyh
... ... @@ -540,6 +573,9 @@ class OptimizeController extends BaseController
break;
}
foreach ($chunk['list'] as $item) {
if(empty($item['route'])){
continue;
}
$data[$key][] = $domain . $item['route'] . '/{' . $item['title'] . '}';
}
$offset++;
... ...
... ... @@ -1178,7 +1178,14 @@ class ProjectController extends BaseController
$this->response('success');
}
if($projectInfo['serve_id'] == 8){
//获取服务器数据
$serverIpModel = new ServersIp();
$serversIpInfo = $serverIpModel->read(['id' => $projectInfo['serve_id']], ['servers_id']);
if(!$serversIpInfo){
$this->fail('获取项目所属服务器失败');
}
if($serversIpInfo['servers_id'] == ServerConfig::SELF_SITE_ID){
//自建站项目
if($this->param['site_status'] == 1){
//关闭站点
... ... @@ -1206,12 +1213,6 @@ class ProjectController extends BaseController
}
}else{
//开启站点:创建建站任务
$serverIpModel = new ServersIp();
$serversIpInfo = $serverIpModel->read(['id' => $projectInfo['serve_id']], ['servers_id']);
if(!$serversIpInfo){
$this->fail('获取项目所属服务器失败');
}
if ($projectInfo['project_type'] == Project::PROJECT_TYPE_SEO) {
$type = DomainCreateTask::TYPE_BLOG;
} else {
... ...
... ... @@ -61,6 +61,15 @@ class RenewProjectController extends BaseController
if(!empty($param['search']) && !empty($param['search_type'])){
$map[$this->param['search_type']] = ['like', "%{$this->param['search']}%"];
}
if(isset($param['zone_id']) && !empty($param['zone_id'])){
$map['channel'] = ['like','%"zone_id": "'.$this->map['zone_id'].'"%'];
}
if(isset($param['channel_id']) && !empty($param['channel_id'])){
$map['channel'] = ['like','%"channel_id": "'.$this->map['channel_id'].'"%'];
}
if(isset($param['user_id']) && !empty($param['user_id'])){
$map['channel'] = ['like','%"user_id": "'.$this->map['user_id'].'"%'];
}
//按类型搜索
$map['delete_status'] = 0;
if(empty($param['type'])){
... ...
... ... @@ -25,7 +25,7 @@ class ATemplateController extends BaseController
*/
public function lists(ATemplateLogic $aTemplateLogic){
$templateLabel = new TemplateLabel();
$this->searchLabelName($templateLabel);
$this->map = $this->searchLabelName($templateLabel);
$filed = ['id','name','image','url','status','sort','deleted_status','test_model','created_at','project_id'];
$lists = $aTemplateLogic->aTemplateList($this->map,$this->page,$this->row,$this->order,$filed);
if(!empty($lists) && !empty($lists['list'])){
... ... @@ -51,7 +51,7 @@ class ATemplateController extends BaseController
$this->map['id'] = ['in',$id_arr];
unset($this->map['label_name']);
}
return true;
return $this->map;
}
/**
... ...
... ... @@ -28,7 +28,7 @@ class ATemplateModuleController extends BaseController
public function lists(TemplateModule $templateModule){
$templateLabel = new TemplateLabel();
$this->map['deleted_status'] = 0;
$this->searchLabelName($templateLabel);
$this->map = $this->searchLabelName($templateLabel);
$lists = $templateModule->lists($this->map,$this->page,$this->row,$this->order);
if(!empty($lists) && !empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
... ... @@ -52,7 +52,7 @@ class ATemplateModuleController extends BaseController
$this->map['id'] = ['in',$id_arr];
unset($this->map['label_name']);
}
return true;
return $this->map;
}
... ...
... ... @@ -49,7 +49,6 @@ class TicketController extends BaseController
],[
'dept_id.required' => '技术组id',
]);
$this->order = 'ticket_num';
$sort = $this->map['sort'] ?? 'desc';
$data = $this->logic->getManageTicketCount($this->map,$this->order,$sort);
$this->response('success',Code::SUCCESS,$data);
... ...
... ... @@ -88,7 +88,7 @@ class AsideTicketLogController extends BaseController
{
// 如果所有子任务都完成了,则将工单状态改为已完成
// todo 注意:建站期间的工单,所有人都完成后,不自动完成工单,需要项目经理验收修改工单状态
if (!($ticket->project->status == 1 && in_array($ticket->project->project_cate, [1, 2])))
if (($ticket->title == 'GEO项目') || !($ticket->project->status == 1 && in_array($ticket->project->project_cate, [1, 2])))
{
$ticket->status = Tickets::STATUS_COMPLETED;
$ticket->end_at = now();
... ...
... ... @@ -109,7 +109,7 @@ class AyrShareController extends BaseController
'id.required' => 'ID不能为空'
]);
$info = $ayrShareLogic->ayr_share_info();
if(!empty($info['title'])){
if(!empty($info['profile_key'])){
$data = [
// 'title'=>$info['title'],
'profileKey'=>$info['profile_key']
... ...
... ... @@ -117,4 +117,16 @@ class GeoQuestionResController extends BaseController
$data = $this->logic->getSearchDate();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :获取当前项目所有标签
* @name :getLabel
* @author :lyh
* @method :post
* @time :2025/8/19 16:39
*/
public function getLabel(){
$data = $this->logic->getLabelData();
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -88,11 +88,11 @@ class GeoLogic extends BaseLogic
$this->param['url'] = json_encode($this->param['url'] ?? [],true);
$this->param['keywords'] = json_encode($this->param['keywords'] ?? [],true);
//执行时间设置为今天
$this->param['next_time'] = date('Y-m-d');
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
$this->model->edit($this->param,['id'=>$id]);
}else{
$this->param['next_time'] = date('Y-m-d');
$id = $this->model->addReturnId($this->param);
}
return $this->success(['id'=>$id]);
... ...
... ... @@ -34,7 +34,6 @@ class AggregateKeywordLogic extends BaseLogic
$this->param['id'] = $this->model->addReturnId($this->param);
// 添加预设功能 同步关键词 迁入到 namespace App\Console\Commands\Product\SetKeywordSync
}
return $this->success(['id'=>$this->param['id']]);
}
... ...
... ... @@ -61,10 +61,11 @@ class TicketLogic extends BaseLogic
$dailyModel = new TicketDailyCount();
$dailyList = $dailyModel->list([],'date',['*'],'desc',5);//取最近5条数据
$manageModel = new TicketDailyManageCount();
$manageList = $manageModel->list(['date'=>$date,'ticket_num'=>['!=',0],'average_time'=>['!=','']],'average_time',['*'],'asc',5);//取最近5条数据
$manageList = $manageModel->list(['dept_id'=>1,'date'=>$date,'ticket_num'=>['!=',0],'average_time'=>['!=','']],'average_time',['*'],'asc');
$manage2List = $manageModel->list(['dept_id'=>2,'date'=>$date,'ticket_num'=>['!=',0],'average_time'=>['!=','']],'average_time',['*'],'asc');
$deptModel = new TicketDailyDeptCount();
$deptList = $deptModel->list(['date'=>$date,'ticket_num'=>['!=',0]],'average_time',['*'],'asc',5);
$data = ['daily'=>$dailyList,'manage'=>$manageList,'dept'=>$deptList];
$deptList = $deptModel->list(['date'=>$date,'ticket_num'=>['!=',0]],'average_time',['*'],'asc');
$data = ['daily'=>$dailyList,'manage'=>$manageList,'manage2'=>$manage2List,'dept'=>$deptList];
return $this->success($data);
}
... ...
... ... @@ -48,19 +48,22 @@ class GeoQuestionResLogic extends BaseLogic
*/
public function getResultList($map = [],$page = 1,$row = 20){
$map['project_id'] = $this->user['project_id'];
$filed = ['id','project_id','question_id','platform','is_match','question','en_question','keywords','url','created_at','updated_at'];
$filed = ['id','project_id','question_id','platform','is_match','question','en_question','keywords','url','label','created_at','updated_at'];
if(!empty($map['created_at'])){
$map['created_at'] = ['between',[$map['created_at'].' 00:00:00',$map['created_at'].' 23:59:59']];
$this->model = new GeoQuestionLog();
}
if(isset($map['label']) && !empty($map['label'])){
$map['label'] = ['like','%'.$map['label'].'%'];
}
if(!empty($map['keywords'])){
$map['keywords'] = ['like','%'.$map['keywords'].'%'];
}
$query = $this->model->formatQuery($map);
$query = $query->where(function ($q) {
$q->whereRaw('JSON_LENGTH(keywords) > 0')
->orWhereRaw('JSON_LENGTH(url) > 0');
});
// $query = $query->where(function ($q) {
// $q->whereRaw('JSON_LENGTH(keywords) > 0')
// ->orWhereRaw('JSON_LENGTH(url) > 0');
// });
$data = $query->orderByRaw('CHAR_LENGTH(question) ASC')->paginate($row, $filed, 'page', $page);;
return $this->success($data);
}
... ... @@ -87,12 +90,17 @@ class GeoQuestionResLogic extends BaseLogic
public function countQuantity(){
$questionModel = new GeoQuestion();
$list = $questionModel->list(['project_id'=>$this->user['project_id']],['question','keywords','url']);
$questionTotalCount = $urlTotalCount = $keywordsTotalCount = $keywordUrlCount = 0;
$core_question_count = $questionTotalCount = $urlTotalCount = $keywordsTotalCount = 0;
$keywordArr = [];
$questionLogModel = new GeoQuestionLog();
$keywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0]]);
$coreKeywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'label'=>['like','%核心问题%'],'hit'=>['!=',0]]);
foreach ($list as $item){
$questionTotalCount += count($item['question'] ?? []);
//核心问题数
if(strpos($item['label'],'核心问题') !== false){
$core_question_count += count($item['question'] ?? []);
}
$keywordsTotalCount += count($item['keywords'] ?? []);
$urlTotalCount += count($item['url'] ?? []);
foreach ($item['keywords'] as $keyWordItem){
... ... @@ -107,6 +115,8 @@ class GeoQuestionResLogic extends BaseLogic
'question_count'=>$questionTotalCount,
'keywords_url_count'=>$keywordUrlCount,
'keywords_arr' => $keywordArr,
'core_question_count'=>$core_question_count,
'core_keyword_url_count'=>$coreKeywordUrlCount
];
return $this->success($data);
}
... ... @@ -141,4 +151,21 @@ class GeoQuestionResLogic extends BaseLogic
return $this->success($dates);
}
/**
* @remark :获取标签列表
* @name :getLabelData
* @author :lyh
* @method :post
* @time :2025/8/19 16:42
*/
public function getLabelData(){
$questionModel = new GeoQuestion();
$labelArr = $questionModel->selectField(['project_id'=>$this->user['project_id']],'label');
$data = [];
foreach ($labelArr as $item){
$arr = explode("\r\n",$item);
$data = array_values(array_unique(array_merge($arr,$data)));
}
return $this->success($data);
}
}
... ...
... ... @@ -142,7 +142,6 @@ class KeywordLogic extends BaseLogic
$this->fail('保存失败,请联系管理员');
}
Common::del_user_cache('product_keyword',$this->user['project_id']);
NoticeLog::createLog(NoticeLog::TYPE_INIT_KEYWORD, ['project_id' => $this->user['project_id']]);
return $this->success();
}
... ...
... ... @@ -345,6 +345,11 @@ class ProductLogic extends BaseLogic
}else{
$param['category_id'] = '';
}
if(isset($param['og_image']) && !empty($param['og_image'])){
$param['og_image'] = str_replace_url($param['og_image'] ?? '');
}else{
$param['og_image'] = $param['gallery'][0]['url'] ?? '';
}
//产品图
if(isset($param['gallery']) && !empty($param['gallery'])){
foreach ($param['gallery'] as $k => $v){
... ... @@ -357,11 +362,6 @@ class ProductLogic extends BaseLogic
$param['thumb'] = Arr::a2s([]);
$param['gallery'] = Arr::a2s([]);
}
if(isset($param['og_image']) && !empty($param['og_image'])){
$param['og_image'] = str_replace_url($param['og_image'] ?? '');
}else{
$param['og_image'] = $param['thumb']['url'] ?? '';
}
if(isset($param['files'])){
$param['files']['url'] = str_replace_url($param['files']['url'] ?? '');
$param['files'] = Arr::a2s($param['files'] ?? []);
... ...
... ... @@ -67,7 +67,7 @@ class RankDataLogic extends BaseLogic
$speed = Speed::where('project_id', $project_id)->first();
//暂停优化的项目(排名数据显示横杠 - ,关键词排名第一页 、 关键词排名前十页 、 Google收录页面数 、 可查询外链数)
if(!empty($project['level'])){
if (in_array('2', $project['level']) || in_array('3', $project['level'])) {
if (in_array('2', $project['level'])) {// || in_array('3', $project['level'])
$rank['first_page_num'] = $rank['first_ten_pages_num'] = $rank['indexed_pages_num'] = $external_links['total'] = '-';
}
}
... ... @@ -555,7 +555,7 @@ class RankDataLogic extends BaseLogic
$without_extension_project_ids = [658]; //是否达标只统计主词的
$extension_project_ids = [354]; //扩展词也到达标的
$compliance_project_ids = [2163,257,823,1750,497]; //直接达标处理的
$ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685,3309];//暂停的项目
$ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685];//暂停的项目
$uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目
//一个项目多个api_no
$multiple_api_no_project_ids = [
... ...
... ... @@ -145,7 +145,7 @@ class DomainSettingLogic extends BaseLogic
//变更ip使用数量
$server_ip_model->edit(['total' => $record_info['total'] + 1], ['id' => $record_info['id']]);
$server_model->edit(['being_number' => $record_info['total'] + 1], ['id' => $record_info['servers_id']]);
$server_model->where(['id'=>$record_info['servers_id']])->increment('being_number',1);
//创建建站任务
$domain_create_model = new DomainCreateTask();
... ... @@ -204,7 +204,7 @@ class DomainSettingLogic extends BaseLogic
//变更ip使用数量
$server_ip_model->edit(['total' => $record_info['total'] + 1], ['id' => $record_info['id']]);
$server_model->edit(['being_number' => $record_info['total'] + 1], ['id' => $record_info['servers_id']]);
$server_model->where(['id'=>$record_info['servers_id']])->increment('being_number',1);
}
DB::commit();
... ...
... ... @@ -64,7 +64,8 @@ class Channel extends Base
return $sales_id;
}
$channel_alias = self::where('id', $user['channel_id'])->value('alias');
$channel_alias = $channel_alias . '-' . $user['name'];
$channel_mobile = self::where('id', $user['channel_id'])->value('contact_mobile');
$channel_alias = $channel_alias . '-' . $user['name'].'-'.$channel_mobile;
Cache::put('channel_alias_'.$sales_id,$channel_alias,24 * 3600);
}
return $channel_alias;
... ...
... ... @@ -79,6 +79,7 @@ class Project extends Base
3=>'2-4',
4=>'3-5',
5=>'5-7',
6=>'1/2'
];
if($val){
return $arr[$val] ?? '';
... ...
... ... @@ -29,6 +29,7 @@ class MessagePush extends Base
const TYPE_WEEK = 'week';
const TYPE_TICKET = 'Ticket';
const TYPE_DOMAIN = 'domain';
const TYPE_DOMAIN_V5 = 'domain_v5';
//设置关联表名
/**
* @var mixed
... ...
... ... @@ -103,9 +103,10 @@ return [
],
//域名解析别处记录日志
'analyze_other' => [
'driver' => 'custom',
'via' => \App\Factory\LogFormatterFactory::class,
'prefix' => 'analyze_other',
'driver' => 'daily',
'path' => storage_path('logs/analyze_other/laravel.log'),
'level' => 'debug',
'days' => 14,
],
'stack' => [
'driver' => 'stack',
... ...
... ... @@ -328,8 +328,9 @@ Route::middleware(['aloginauth'])->group(function () {
Route::any('/saveAiPrefix', [Aside\Optimize\OptimizeController::class, 'saveAiPrefix'])->name('admin.optimize_saveAiPrefix');//保存Ai前后缀
Route::any('/setRobots', [Aside\Optimize\OptimizeController::class, 'setRobots'])->name('admin.optimize_setRobots');//设置robots开关
Route::any('/editBacklink', [Aside\Optimize\OptimizeController::class, 'editBacklink'])->name('admin.optimize_editBacklink');//设置backlink开关
Route::any('/setAiVideo', [Aside\Optimize\OptimizeController::class, 'setAiVideo'])->name('admin.optimize_setAiVideo');//设置backlink开关
Route::any('/anchorTextList', [Aside\Optimize\OptimizeController::class, 'anchorTextList'])->name('admin.optimize_anchorTextList');//设置backlink开关
Route::any('/setAiVideo', [Aside\Optimize\OptimizeController::class, 'setAiVideo'])->name('admin.optimize_setAiVideo');//设置ai_video
Route::any('/anchorTextList', [Aside\Optimize\OptimizeController::class, 'anchorTextList'])->name('admin.optimize_anchorTextList');//锚文本链接
Route::any('/getKeywordRouteList', [Aside\Optimize\OptimizeController::class, 'getKeywordRouteList'])->name('admin.optimize_getKeywordRouteList');//聚合页链接
Route::any('/saveMinorLanguages', [Aside\Optimize\OptimizeController::class, 'saveMinorLanguages'])->name('admin.optimize_saveMinorLanguages');//设置小语种监控开关
Route::any('/editTranslateStatus', [Aside\Optimize\OptimizeController::class, 'editTranslateStatus'])->name('admin.optimize_editTranslateStatus');//设置robots开关
Route::any('/getAnchorLink', [Aside\Optimize\OptimizeController::class, 'getAnchorLink'])->name('admin.optimize_getAnchorLink');//设置robots开关
... ...
... ... @@ -754,6 +754,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::prefix('geo_result')->group(function () {
Route::any('/getList', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getList'])->name('geo_result_getList');
Route::any('/getInfo', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getInfo'])->name('geo_result_getInfo');
Route::any('/getLabel', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class,'getLabel'])->name('geo_result_getLabel');
Route::any('/getType', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getType'])->name('geo_result_getType');//geo设置类型
Route::any('/getCount', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getCount'])->name('geo_result_getCount');//geo设置类型统计数量
Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计
... ...