|
...
|
...
|
@@ -41,6 +41,7 @@ class APublicModel extends Base |
|
|
|
->where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
|
|
|
|
$newsNumber = DB::connection('custom_mysql')->table('gl_news')
|
|
|
|
->where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
|
|
|
|
$aiBlogNumber = DB::connection('custom_mysql')->table('gl_ai_blog')->where('project_id', $project_id)->count();
|
|
|
|
$keyNumber = DB::connection('custom_mysql')->table('gl_product_keyword')
|
|
|
|
->where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
|
|
|
|
//获取项目的询盘数量
|
|
...
|
...
|
@@ -49,7 +50,7 @@ class APublicModel extends Base |
|
|
|
if(!empty($countInfo)){
|
|
|
|
$inquiryNumber = $countInfo->inquiry_num ?? 0;
|
|
|
|
}
|
|
|
|
$data = ['product'=>$productNumber,'blog'=>$blogNumber,'news'=>$newsNumber,'key'=>$keyNumber,'inquiry'=>$inquiryNumber];
|
|
|
|
$data = ['product'=>$productNumber,'blog'=>($blogNumber + $aiBlogNumber),'news'=>$newsNumber,'key'=>$keyNumber,'inquiry'=>$inquiryNumber];
|
|
|
|
Cache::add('product_blog_news_'.$project_id,$data,30 * 60);
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
...
|
...
|
|