public function askPost($request, $response) {/*{{{*/ $this->checkStartMarkSession($response); $res = $this->setIntentionTitle();//拼咨询标题 if (false == $res) { $response->setRedirect($response->router->urlfor('newcase/askindex')); return false; } $askSpace = AskSessionInfo::getBindSpace(); $patient = AskSessionInfo::getBindPatient(); $bindBingLiDtos = AskSessionInfo::getBindDtos(); if (empty($bindBingLiDtos)) { $response->setRedirect($response->router->urlfor('newcase/askindex')); return false; } $caseTitle = AskSessionInfo::getThreadTitle(); if(trim($caseTitle) == "") { throw new BizException('标题不能为空'); } if(false == $askSpace->isNull()) { $isCanAsk = $this->ensureCanAsk($this->user, $askSpace, $response); if(false == $isCanAsk) { return false; } $product = ProductClient::getInstance()->getFirstFlowProduct($askSpace); } else { $product = FirstFlowPoolVirtualProduct::fetch(); } $intention = IntentionClient::getInstance()->createWithProduct($patient, $product, Intention::SRC_TOUCH, $bindBingLiDtos); if(false == $intention->isNull()) { AskSessionInfo::session_destroy(); $response->setRedirect($response->router->urlfor('newcase/asksuccess', array('intentionId'=>$intention->id))); } else { throw new BizException('提交咨询出错,请重试'); } }/*}}}*/
public function getThreadTitle($request, $response) {/*{{{*/ $threadTitle = AskSessionInfo::getThreadTitle(); echo $threadTitle; return parent::DIRECT_OUTPUT; }/*}}}*/