作者 lyh

变更数据

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