作者 lyh

变更数据

@@ -90,7 +90,10 @@ class GeoWritingsLogic extends BaseLogic @@ -90,7 +90,10 @@ class GeoWritingsLogic extends BaseLogic
90 public function sendWechatMessage() 90 public function sendWechatMessage()
91 { 91 {
92 $this->model->edit(['status'=>2],['status'=>1,'project_id'=>$this->param['project_id']]); 92 $this->model->edit(['status'=>2],['status'=>1,'project_id'=>$this->param['project_id']]);
93 - GeoWritings::sendConfirmMessage($this->param['project_id']); 93 + $data = GeoWritings::sendConfirmMessage($this->param['project_id']);
  94 + if($data === false){
  95 + $this->fail('项目未绑定微信群');
  96 + }
94 return $this->success(); 97 return $this->success();
95 } 98 }
96 } 99 }
@@ -79,7 +79,7 @@ class GeoWritings extends Base @@ -79,7 +79,7 @@ class GeoWritings extends Base
79 { 79 {
80 $friend = ProjectAssociation::where(['project_id' => $project_id])->first(); 80 $friend = ProjectAssociation::where(['project_id' => $project_id])->first();
81 if (empty($friend)) { 81 if (empty($friend)) {
82 - throw new \Exception('项目未绑定微信群'); 82 + return false;
83 } 83 }
84 $content_type = 'Link'; 84 $content_type = 'Link';
85 $send_time = now(); 85 $send_time = now();