|
@@ -44,17 +44,14 @@ class APublicModel extends Base |
|
@@ -44,17 +44,14 @@ class APublicModel extends Base |
|
44
|
->where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
|
44
|
->where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
|
|
45
|
//获取项目的询盘数量
|
45
|
//获取项目的询盘数量
|
|
46
|
$inquiryNumber = 0;
|
46
|
$inquiryNumber = 0;
|
|
47
|
-// $countInfo = DB::table('gl_count')->where('project_id', $project_id)->orderBy('id', 'desc')
|
|
|
|
48
|
-// ->first();
|
|
|
|
49
|
-// if(!empty($countInfo)){
|
|
|
|
50
|
-// @file_put_contents(storage_path('logs/lyh_error.log'), var_export($countInfo, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
51
|
-// $inquiryNumber = $countInfo['inquiry_num'] ?? 0;
|
|
|
|
52
|
-// }
|
47
|
+ $countInfo = DB::table('gl_count')->where('project_id', $project_id)->orderBy('id', 'desc')->first();
|
|
|
|
48
|
+ if(!empty($countInfo)){
|
|
|
|
49
|
+ $inquiryNumber = $countInfo->inquiry_num ?? 0;
|
|
|
|
50
|
+ }
|
|
53
|
$data = ['product'=>$productNumber,'blog'=>$blogNumber,'news'=>$newsNumber,'key'=>$keyNumber,'inquiry'=>$inquiryNumber];
|
51
|
$data = ['product'=>$productNumber,'blog'=>$blogNumber,'news'=>$newsNumber,'key'=>$keyNumber,'inquiry'=>$inquiryNumber];
|
|
54
|
Cache::add('product_blog_news_'.$project_id,$data,30 * 60);
|
52
|
Cache::add('product_blog_news_'.$project_id,$data,30 * 60);
|
|
55
|
}
|
53
|
}
|
|
56
|
DB::disconnect('custom_mysql');
|
54
|
DB::disconnect('custom_mysql');
|
|
57
|
return $data;
|
55
|
return $data;
|
|
58
|
}
|
56
|
}
|
|
59
|
-
|
|
|
|
60
|
} |
57
|
} |