作者 赵彬吉
@@ -65,9 +65,9 @@ class UpgradeProjectCount extends Command @@ -65,9 +65,9 @@ class UpgradeProjectCount extends Command
65 ->groupBy('month')->get()->toArray(); 65 ->groupBy('month')->get()->toArray();
66 foreach ($list as $k=>$v){ 66 foreach ($list as $k=>$v){
67 $v = (array)$v; 67 $v = (array)$v;
68 - if($v['month'] == date('Y-m')){  
69 - continue;  
70 - } 68 +// if($v['month'] == date('Y-m')){
  69 +// continue;
  70 +// }
71 $monthCountModel = new MonthCount(); 71 $monthCountModel = new MonthCount();
72 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]); 72 $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]);
73 // 获取当月开始时间 73 // 获取当月开始时间
@@ -16,6 +16,7 @@ use App\Models\Com\Notify; @@ -16,6 +16,7 @@ use App\Models\Com\Notify;
16 use App\Models\Com\UpdateNotify; 16 use App\Models\Com\UpdateNotify;
17 use App\Models\Com\UpdateProgress; 17 use App\Models\Com\UpdateProgress;
18 use App\Models\Devops\ServerConfig; 18 use App\Models\Devops\ServerConfig;
  19 +use App\Models\Devops\ServersIp;
19 use App\Models\Domain\DomainInfo; 20 use App\Models\Domain\DomainInfo;
20 use App\Models\Project\Country as CountryModel; 21 use App\Models\Project\Country as CountryModel;
21 use App\Models\Project\Project; 22 use App\Models\Project\Project;
@@ -51,8 +52,14 @@ class CNoticeController extends BaseController @@ -51,8 +52,14 @@ class CNoticeController extends BaseController
51 //获取项目所在服务器 52 //获取项目所在服务器
52 $project_model = new Project(); 53 $project_model = new Project();
53 $project_info = $project_model->read(['id'=>$project_id],['serve_id']); 54 $project_info = $project_model->read(['id'=>$project_id],['serve_id']);
  55 + if(!$project_info){
  56 + $this->fail('未查询到项目数据');
  57 + }
  58 + $serve_ip_model = new ServersIp();
  59 + $serve_ip_info = $serve_ip_model->read(['id'=>$project_info['serve_id']],['servers_id']);
  60 + $servers_id = $serve_ip_info ? $serve_ip_info['servers_id'] : 0;
54 61
55 - if($project_info && $project_info['serve_id'] == ServerConfig::SELF_SITE_ID){ 62 + if($servers_id == ServerConfig::SELF_SITE_ID){
56 //自建站服务器:如果项目已经上线,不请求C端接口,数据直接入库 63 //自建站服务器:如果项目已经上线,不请求C端接口,数据直接入库
57 $domain_model = new DomainInfo(); 64 $domain_model = new DomainInfo();
58 $domain_info = $domain_model->read(['project_id'=>$this->user['project_id']],['domain']); 65 $domain_info = $domain_model->read(['project_id'=>$this->user['project_id']],['domain']);
@@ -7,6 +7,7 @@ use App\Helper\Arr; @@ -7,6 +7,7 @@ use App\Helper\Arr;
7 use App\Http\Controllers\Bside\BaseController; 7 use App\Http\Controllers\Bside\BaseController;
8 use App\Http\Logic\Bside\Product\KeywordLogic; 8 use App\Http\Logic\Bside\Product\KeywordLogic;
9 use App\Http\Requests\Bside\Product\KeywordRequest; 9 use App\Http\Requests\Bside\Product\KeywordRequest;
  10 +use App\Models\Com\NoticeLog;
10 use App\Models\Product\Keyword; 11 use App\Models\Product\Keyword;
11 use App\Models\Product\KeywordRelated; 12 use App\Models\Product\KeywordRelated;
12 use App\Models\Product\Product; 13 use App\Models\Product\Product;
@@ -232,4 +233,15 @@ class KeywordController extends BaseController @@ -232,4 +233,15 @@ class KeywordController extends BaseController
232 } 233 }
233 $this->response('success'); 234 $this->response('success');
234 } 235 }
  236 +
  237 + /**
  238 + * @remark :批量提交更新关键词
  239 + * @name :batchUpdateKeyword
  240 + * @author :lyh
  241 + * @method :post
  242 + * @time :2024/7/2 10:14
  243 + */
  244 + public function batchUpdateKeyword(){
  245 + $noticeLogModel = new NoticeLog();
  246 + }
235 } 247 }
@@ -34,7 +34,7 @@ class ServerConfig extends Base @@ -34,7 +34,7 @@ class ServerConfig extends Base
34 34
35 const STATUS_ONE = 1; 35 const STATUS_ONE = 1;
36 36
37 - const SELF_SITE_ID = 8;//自建站服务器ID 37 + const SELF_SITE_ID = 6;//自建站服务器ID
38 38
39 /** 39 /**
40 * @remark :获取数据用户名解密 40 * @remark :获取数据用户名解密