public function help($request, $response) { $template = $request->template; if (false == empty($template)) { $response->_my_template = '/admindoctor/'.$template; } else { $this->message('模板不能为空 ', $response, array('forward' => Ui::createUrl('Case,Index'))); } }
/** 把一个咨询的患者转化成患友会成员 */ public function newFromCasePatient($request, $response) { /*{{{*/ $threadId = $request->case_id; $thread = DAL::get()->find('thread', $threadId); $patient = $thread->patient; $groupId = $request->category_id; $space = $thread->space; ForumClient::getInstance()->createGroupOneMember($space, $thread->user, $thread->patient->id, $groupId); $defaultGroupId = ForumClient::getInstance()->defaultGroupMember($space->id); ForumClient::getInstance()->createGroupOneMember($space, $thread->user, $thread->patient->id, $defaultGroupId); //创建至默认组 $group = DAL::get()->find('ReGroup', $groupId); //发站内信 $msgContent = $thread->user->name . ",您好!<br/>" . $thread->space->name . "大夫已经邀请您参加患友会!<br/>建议您在疾病治疗过程中,多跟病友交流,分享经验!<br/>点这儿,<a href=" . $thread->space->getResidentEvilUrl() . " target='_blank'>去大夫患友会</a> >> "; StationLetterClient::getInstance()->sendMsg(Message::AdminUserId, $thread->user->id, Box::RESIDENTEVIL_TITLE, $msgContent, array('relationShip' => $group)); $this->message('患者 ' . $patient->name . ' 已经移动到患友会 ' . $group->name . ' 分组!', $response, array('text' => '返回问题', 'url' => Ui::createUrl('Case,Detail', array('case_id' => $thread->id)))); }