作者 lyh

gx

@@ -60,15 +60,13 @@ class GeneratePage extends Command @@ -60,15 +60,13 @@ class GeneratePage extends Command
60 $this->output(' taskID: ' . $noticeInfo['id'] . ' start'); 60 $this->output(' taskID: ' . $noticeInfo['id'] . ' start');
61 $c_url = $noticeInfo['data']['c_url']; 61 $c_url = $noticeInfo['data']['c_url'];
62 $c_params = $noticeInfo['data']['c_params']; 62 $c_params = $noticeInfo['data']['c_params'];
63 - try {  
64 - $re = http_post($c_url, $c_params, [], true);  
65 - if (isset($re['status']) && $re['status'] == 200) {  
66 - $this->output($c_url . ' | 请求成功');  
67 - } else {  
68 - $this->output($c_url . ' | ' . ($re['message'] ?? '未返回失败原因'));  
69 - }  
70 - } catch (\Exception $e) {  
71 - $this->output($c_url . ' | 请求异常:' . $e->getMessage()); 63 + $re = http_post($c_url, $c_params, [], true);
  64 + if (isset($re['status']) && $re['status'] == 200) {
  65 + $noticeModel->edit(['status'=>1],['id'=>$noticeInfo['id']]);
  66 + $this->output($c_url . ' | 请求成功');
  67 + } else {
  68 + $noticeModel->edit(['status'=>2],['id'=>$noticeInfo['id']]);
  69 + $this->output($c_url . ' | ' . ($re['message'] ?? '未返回失败原因'));
72 } 70 }
73 $this->output(' taskID: ' . $noticeInfo['id'] . ' end'); 71 $this->output(' taskID: ' . $noticeInfo['id'] . ' end');
74 } catch (\Exception $e) { 72 } catch (\Exception $e) {