作者 zhl

排除GEO无版本

@@ -64,6 +64,9 @@ class SyncProject extends Command @@ -64,6 +64,9 @@ class SyncProject extends Command
64 */ 64 */
65 public function handle() 65 public function handle()
66 { 66 {
  67 + $api = new OaGlobalsoApi();
  68 + $data = $api->order_info(15086);
  69 + dd($data);
67 while (true){ 70 while (true){
68 $list = NoticeLog::where('type', NoticeLog::TYPE_PROJECT)->where('status', NoticeLog::STATUS_PENDING)->get(); 71 $list = NoticeLog::where('type', NoticeLog::TYPE_PROJECT)->where('status', NoticeLog::STATUS_PENDING)->get();
69 foreach ($list as $item){ 72 foreach ($list as $item){
@@ -102,7 +105,7 @@ class SyncProject extends Command @@ -102,7 +105,7 @@ class SyncProject extends Command
102 $this->renewSync($data['data']); 105 $this->renewSync($data['data']);
103 } 106 }
104 // TODO 如果是续费项目 并且有GEO版本,需要处理GEO版本 107 // TODO 如果是续费项目 并且有GEO版本,需要处理GEO版本
105 - if (($data['data']['order_type'] == '续费') && !empty($data['data']['geo_plan'])) { 108 + if (($data['data']['order_type'] == '续费') && FALSE == empty($data['data']['geo_plan']) && $data['data']['geo_plan'] != '无') {
106 //创建对应的GEO版本 109 //创建对应的GEO版本
107 $projectModel = new Project(); 110 $projectModel = new Project();
108 $seo_plan = $this->versionSeoData($data['data']['geo_plan'] ?? ''); 111 $seo_plan = $this->versionSeoData($data['data']['geo_plan'] ?? '');