/** * * @return array */ public function item($id = NULL) { if ($this->get_method() != 'GET') { $this->send_response(405, NULL, '请求的方法不存在'); } if (empty($id)) { $this->send_response(400, NULL, '401307:交易ID为空'); } $deal_id = (int) $id; $item = $this->model->item($deal_id, $this->user_id); $this->send_response(200, $item); }