objMSupplierOrderDetails = new MSupplierOrderDetails($this->onlineEnterpriseId,$this->onlineUserId); } /** * Doc: (des="") * User: XMing * Date: 2020/12/22 * Time: 5:20 下午 */ public function getAll() { $params = $this->request->getRawJson(); $page = getArrayItem($params,'page',1); $pageSize = getArrayItem($params,'pageSize',10); $pageParams = pageToOffset($page, $pageSize); $params['limit'] = $pageParams['limit']; $params['offset'] = $pageParams['offset']; !empty($this->supplierId) && $params['supplierId'] = $this->supplierId; $params['auditStatus'] = StatusCode::$auditStatus['auditPass']; $result = $this->objMSupplierOrderDetails->getAll($params); if ($result->isSuccess()) { $returnData = $result->getData(); $pageData = [ 'pageIndex' => $page, 'pageSize' => $pageSize, 'pageTotal' => $returnData['total'], ]; parent::sendOutput($returnData['data'], 0, $pageData); } parent::sendOutput($result->getData(), $result->getErrorCode()); } /** * Doc: (des="") * User: XMing * Date: 2020/12/22 * Time: 6:14 下午 * @throws \Exception */ public function get() { $id = $this->request->param('request_id'); if (empty($id)) { parent::sendOutput('id参数错误', ErrorCode::$paramError); } $result = $this->objMSupplierOrderDetails->get($id); if (!$result->isSuccess()) { parent::sendOutput($result->getData(), $result->getErrorCode()); } parent::sendOutput($result->getData()); } }