作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !2983
@@ -63,7 +63,7 @@ class GeoCount extends Command @@ -63,7 +63,7 @@ class GeoCount extends Command
63 return true; 63 return true;
64 } 64 }
65 $projectModel = new Project(); 65 $projectModel = new Project();
66 - $geo_qualify_day = $projectModel->getValue(['id'=>$project_id],['geo_qualify_day']); 66 + $geo_qualify_day = $projectModel->getValue(['id'=>$project_id],'geo_qualify_day');
67 $geoQuestionResModel = new GeoQuestionResult(); 67 $geoQuestionResModel = new GeoQuestionResult();
68 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude']; 68 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude'];
69 foreach ($project_id as $item){ 69 foreach ($project_id as $item){
@@ -67,7 +67,7 @@ class GeoCountAll extends Command @@ -67,7 +67,7 @@ class GeoCountAll extends Command
67 return true; 67 return true;
68 } 68 }
69 $projectModel = new Project(); 69 $projectModel = new Project();
70 - $geo_qualify_day = $projectModel->getValue(['id'=>$project_id],['geo_qualify_day']); 70 + $geo_qualify_day = $projectModel->getValue(['id'=>$project_id],'geo_qualify_day');
71 $geoQuestionResModel = new GeoQuestionLog(); 71 $geoQuestionResModel = new GeoQuestionLog();
72 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude']; 72 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude'];
73 foreach ($project_id as $item){ 73 foreach ($project_id as $item){
@@ -5,6 +5,7 @@ namespace App\Http\Logic\Bside\HomeCount; @@ -5,6 +5,7 @@ namespace App\Http\Logic\Bside\HomeCount;
5 5
6 use App\Helper\FormGlobalsoApi; 6 use App\Helper\FormGlobalsoApi;
7 use App\Http\Logic\Bside\BaseLogic; 7 use App\Http\Logic\Bside\BaseLogic;
  8 +use App\Models\Geo\GeoCount;
8 use App\Models\Template\BCustomTemplate; 9 use App\Models\Template\BCustomTemplate;
9 use App\Models\Visit\Visit; 10 use App\Models\Visit\Visit;
10 use App\Models\Visit\VisitItem; 11 use App\Models\Visit\VisitItem;
@@ -102,9 +103,6 @@ class CountLogic extends BaseLogic @@ -102,9 +103,6 @@ class CountLogic extends BaseLogic
102 */ 103 */
103 public function keyword_data_count(){ 104 public function keyword_data_count(){
104 $version = $this->project['version'] ?? ''; 105 $version = $this->project['version'] ?? '';
105 - if(!empty($version) && $version != '7.5'){  
106 -  
107 - }  
108 $yesterday = date('Y-m-d'); 106 $yesterday = date('Y-m-d');
109 $rankDataModel = new RankDataModel(); 107 $rankDataModel = new RankDataModel();
110 $param = [ 108 $param = [
@@ -121,6 +119,14 @@ class CountLogic extends BaseLogic @@ -121,6 +119,14 @@ class CountLogic extends BaseLogic
121 $data = []; 119 $data = [];
122 } 120 }
123 } 121 }
  122 + if(!empty($version) && $version != '7.5'){
  123 + $geoCountModel = new GeoCount();
  124 + $geoInfo = $geoCountModel->where('project_id',$this->user['project_id'])->where('date', '<=', date('Y-m-d'))->orderBy('date', 'desc')->first();
  125 + if($geoInfo !== false){
  126 + $data['geo_qualify_total'] = $geoInfo['qualify_total'];
  127 + $data['total_count'] = $geoInfo['qualify_total'] + $data['geo_qualify_total'];
  128 + }
  129 + }
124 return $this->success($data); 130 return $this->success($data);
125 } 131 }
126 132