objDJoin = new DJoin('manage'); $this->objDReservation = new DReservation('manage'); } /** * 加盟列表 * @return ResultWrapper * @throws Exception */ public function getAllJoin() { $dbResult = $this->objDJoin->select(); if($dbResult === false){ return ResultWrapper::fail($this->objDJoin->error(), ErrorCode::$dberror); } return ResultWrapper::success($dbResult); } /** * 加盟添加 * @param $params * @return ResultWrapper */ public function addJoin($params) { $dbResult = $this->objDJoin->insert($params); if($dbResult === false){ return ResultWrapper::fail($this->objDJoin->error(), ErrorCode::$dberror); } return ResultWrapper::success($dbResult); } /** * 预约列表 */ public function getAllReservation() { $dbResult = $this->objDReservation->select(); if($dbResult === false){ return ResultWrapper::fail($this->objDReservation->error(), ErrorCode::$dberror); } return ResultWrapper::success($dbResult); } /** * 预约添加 * @param $params * @return ResultWrapper */ public function addReservation($params) { $dbResult = $this->objDReservation->insert($params); if($dbResult === false){ return ResultWrapper::fail($this->objDReservation->error(), ErrorCode::$dberror); } return ResultWrapper::success($dbResult); } }