作者 赵彬吉
... ... @@ -12,6 +12,7 @@ namespace App\Console\Commands\Ai;
use App\Models\Ai\AiBlog;
use App\Models\Ai\AiBlogAuthor;
use App\Models\Ai\AiBlogList;
use App\Models\Domain\DomainInfo;
use App\Models\Project\ProjectAiSetting;
use App\Models\RouteMap\RouteMap;
use App\Services\AiBlogService;
... ... @@ -107,6 +108,7 @@ class AiBlogTask extends Command
$this->updateAiBlogAuthor($aiSettingInfo,$val);
}
DB::disconnect('custom_mysql');
$this->curlDelRoute($project_id);
}
return true;
}
... ... @@ -196,4 +198,24 @@ class AiBlogTask extends Command
}
return true;
}
/**
* @remark :通知C端生成界面
* @name :sendNotice
* @author :lyh
* @method :post
* @time :2025/3/6 11:51
*/
public function curlDelRoute($project_id){
$domainModel = new DomainInfo();
//获取项目域名
$domain = $domainModel->getProjectIdDomain($project_id);
if(!empty($domain)){
$url = $domain.'api/update_page/?project_id='.$project_id.'&route=7';
shell_exec('curl -k "'.$url.'"');
}else{
echo '域名不存在:' . $project_id . PHP_EOL . date('Y-m-d H:i:s');
}
return true;
}
}
... ...
... ... @@ -65,12 +65,23 @@ class InquiryForwardLogic extends BaseLogic
public function getInquiryLists($map, $page, $row, $order = 'id', $filed = ['*'])
{
$lists = $this->model->lists($map, $page, $row, $order, $filed);
//获取各个状态询盘总数
//统计各个状态询盘总数
if (isset($map['status'])) {
unset($map['status']);
}
$all_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_INIT;
$un_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_FINISH;
$suc_count = $this->model->counts($map);
$map['status'] = InquiryInfo::STATUS_INVALID;
$inv_count = $this->model->counts($map);
$lists['count_stat'] = [
'all_count' => 0,
'un_count' => 0,
'suc_count' => 0,
'inv_count' => 0,
'all_count' => $all_count,
'un_count' => $un_count,
'suc_count' => $suc_count,
'inv_count' => $inv_count,
];
return $this->success($lists);
... ...