public function handle_request_internal() { $userId = $this->_params['userId']; $propId = $this->_params['fPropId']; $num = Bll_Fyk_Prop_Remark::getInstance()->getPropRemarkNum($userId, $propId); $data = array('totalNum' => $num); $result = array("status" => "ok", "data" => $data); return $result; }
public function handle_request_internal() { $userId = $this->_params['userId']; $fPropId = $this->_params['fPropId']; $comment = $this->_params['comment']; $tmp = Bll_Fyk_Prop_Remark::getInstance()->insertPropRemark($userId, $fPropId, $comment); if ($tmp['status'] == true) { $result = array("status" => "ok", "message" => "保存成功"); } else { $result = array("status" => "error", "errcode" => $tmp['errcode'], "message" => $tmp['msg']); } return $result; }
public function handle_request_internal() { $userId = $this->_params['userId']; $propId = $this->_params['fPropId']; $per = isset($this->_params['per']) ? $this->_params['per'] : 20; $sinceId = isset($this->_params['sinceId']) ? $this->_params['sinceId'] : 0; $tmpPer = $per + 1; $list = Bll_Fyk_Prop_Remark::getInstance()->getPropRemark($userId, $propId, 'id', 'desc', $tmpPer, $sinceId); if (count($list) > $per) { array_splice($list, -1); $hasNextPage = 1; } else { $hasNextPage = 0; } $data = array('commentList' => $list, 'hasNextPage' => $hasNextPage, 'per' => $per); $result = array("status" => "ok", "data" => $data); return $result; }