|
...
|
...
|
@@ -32,6 +32,7 @@ class APublicModel extends Base |
|
|
|
*/
|
|
|
|
public static function getNumByProjectId($project_id){
|
|
|
|
ProjectServer::useProject($project_id);
|
|
|
|
try {
|
|
|
|
$data = Cache::get('product_blog_news_'.$project_id);
|
|
|
|
if(!$data){
|
|
|
|
$productNumber = DB::connection('custom_mysql')->table('gl_product')
|
|
...
|
...
|
@@ -51,6 +52,9 @@ class APublicModel extends Base |
|
|
|
$data = ['product'=>$productNumber,'blog'=>$blogNumber,'news'=>$newsNumber,'key'=>$keyNumber,'inquiry'=>$inquiryNumber];
|
|
|
|
Cache::add('product_blog_news_'.$project_id,$data,30 * 60);
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
return $data;
|
|
|
|
}
|
...
|
...
|
|