row->docter->openid; $data = [ $openid, '', '很抱歉,你的医生身份认证失败!', $this->row->docter->name, $this->row->organization->name, $this->row->qualification->name, $this->row->office->name, '点击进入小程序查看详情,有疑问请联系管理员!' ]; DB::beginTransaction(); try { DocterOrganization::where('id',$this->row->id)->update(['state'=>2]); if(!empty($openid)){ admin_send_docter_message('then_result',$data); } DB::commit(); } catch (Exception $e){ dd($e->getMessage()); DB::rollBack(); return $this->response()->error('操作失败'); } return $this->response()->success('操作成功')->refresh(); } }