作者 lyh

gx

@@ -58,18 +58,19 @@ class Demo extends Command @@ -58,18 +58,19 @@ class Demo extends Command
58 protected $description = 'demo'; 58 protected $description = 'demo';
59 59
60 public function handle(){ 60 public function handle(){
61 - $domain = "https://www.xawellauto.com/";  
62 - $token = md5($domain.date("Y-m-d"));  
63 - $url = "https://form.globalso.com/api/external-interface/domain_con/15243d63ed5a5738?domain=$domain&token=$token&source=1,2,3,4&num=15";  
64 - $url = $url."&sta_date=2024-07";  
65 - try {  
66 - $res = http_get($url,['charset=utf-8']);  
67 - } catch (\Exception | GuzzleException $e) {  
68 - errorLog('提交询盘信息失败', $domain, $e);  
69 - return false; 61 + $optimizeModel = new DeployOptimize();
  62 + $list = $optimizeModel->list();
  63 + foreach ($list as $k => $info){
  64 + if(!empty($info['g_top_plan'])){
  65 + if(!isset($gTopData['is_compliance'])){
  66 + $gTopData['is_compliance'] = 0;
70 } 67 }
71 - echo date('Y-m-d H:i:s') . '数据:'.json_encode($res) . PHP_EOL;  
72 - return $res; 68 + $gTopData['is_compliance'] = (int)$gTopData['is_compliance'];
  69 + $optimizeModel->edit(['g_top_plan'=>json_encode($gTopData)],['id'=>$info['id']]);
  70 + echo date('Y-m-d H:i:s') . '重制g_top-project_id:'.$info['project_id'] . PHP_EOL;
  71 + }
  72 + }
  73 + return true;
73 } 74 }
74 75
75 // public function handle(){ 76 // public function handle(){