作者 lyh

变更数据

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