作者 赵彬吉
... ... @@ -145,6 +145,7 @@ class SyncInquiryProject extends Command
->leftJoin('gl_project_deploy_optimize', 'gl_project.id', '=', 'gl_project_deploy_optimize.project_id')
->where('gl_project.type', Project::TYPE_TWO)
->where('gl_project.extend_type', '!=', 5)
->where('gl_project.delete_status', Project::IS_DEL_FALSE)
->where(function ($query) {
$query->orwhere('gl_project_online_check.qa_status', OnlineCheck::STATUS_ONLINE_TRUE)
->orwhere('gl_project.is_upgrade', Project::IS_UPGRADE_TRUE);
... ...
... ... @@ -77,7 +77,7 @@ class GeoQuestionResController extends BaseController
}
/**
* @remark :
* @remark :获取详情
* @name :getInfo
* @author :lyh
* @method :post
... ...
... ... @@ -68,6 +68,14 @@ class InquiryForwardLogic extends BaseLogic
public function getInquiryLists($map, $page, $row, $order = 'id', $filed = ['*'])
{
$lists = $this->model->lists($map, $page, $row, $order, $filed);
//获取操作人
$manage_model = new Manage();
foreach ($lists['list'] as $k => $v) {
$manage_info = $manage_model->read(['id' => $v['operator_id']], ['name']);
$lists['list'][$k]['operator_name'] = $manage_info ? $manage_info['name'] : '';
}
//统计各个状态询盘总数
if (isset($map['status'])) {
unset($map['status']);
... ... @@ -438,23 +446,6 @@ class InquiryForwardLogic extends BaseLogic
{
$model = new InquiryRelayDetail();
$lists = $model->listsWith($map, $page, $row, $order, $filed, 'desc', ['detailLog']);
//获取操作人
$inquiry_info_model = new InquiryInfo();
$manage_model = new Manage();
foreach ($lists['list'] as $k => $v) {
$operator_name = '';
$inquiry_info = $inquiry_info_model->read(['id' => $v['form_id']], ['operator_id']);
if ($inquiry_info) {
$manage_info = $manage_model->read(['id' => $inquiry_info['operator_id']], ['name']);
if ($manage_info) {
$operator_name = $manage_info['name'];
}
}
$lists['list'][$k]['operator_name'] = $operator_name;
}
return $this->success($lists);
}
... ...
... ... @@ -98,7 +98,7 @@ class GeoQuestionResLogic extends BaseLogic
$list = $questionModel->list(['project_id'=>$this->user['project_id']],['question','keywords','url']);
$core_question_count = $questionTotalCount = $urlTotalCount = $keywordsTotalCount = 0;
$keywordArr = [];
$questionLogModel = new GeoQuestionLog();
$questionLogModel = new GeoQuestionResult();
if($this->user['project_id'] == 4533){
$keywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0]]);
foreach ($list as $item){
... ... @@ -141,8 +141,14 @@ class GeoQuestionResLogic extends BaseLogic
'keywords_url_count'=>$keywordUrlCount,
'keywords_arr' => $keywordArr,
];
return $this->success($data);
}
//问题达标数据
$data['question_qualify_count'] = $questionLogModel->where('project_id', $this->user['project_id'])
->where('hit','!=',0)->whereIn('platform',['openai', 'gemini','google_ai_overview'])
->select(DB::raw('COUNT(DISTINCT question) as total'))
->value('total');
return $this->success($data);
}
/**
... ... @@ -156,7 +162,7 @@ class GeoQuestionResLogic extends BaseLogic
$data = [];
$platformModel = new GeoPlatform();
$list = $platformModel->list(['status'=>1],'id',['name','en_name']);
$questionResModel = new GeoQuestionLog();
$questionResModel = new GeoQuestionResult();
foreach ($list as $item){
if($this->user['project_id'] == 4533){
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0],'platform'=>$item['en_name']]);
... ...