objMProcessSetting = new MProcessSetting($this->onlineEnterpriseId); } /** * Doc: (des="设置") * User: XMing * Date: 2020/11/6 * Time: 11:47 上午 */ public function set() { $params = $this->request->getRawJson(); if (empty($params)) { parent::sendOutput('参数为空', ErrorCode::$paramError); } $data = []; foreach ($params as $key => $param){ $data[$key] = [ 'processType' => isset($param['processType']) ? $param['processType'] : null, 'content' => isset($param['content']) ? json_encode($param['content']) : null, 'enterpriseId' => $this->onlineEnterpriseId, 'id' => isset($param['id']) ? $param['id'] : null, ]; foreach ($data[$key] as $k => $v) { if (is_null($v)) { parent::sendOutput($k . '参数错误', ErrorCode::$paramError); } } } $result = $this->objMProcessSetting->set($data); if ($result->isSuccess()) { parent::sendOutput($result->getData()); } parent::sendOutput($result->getData(), $result->getErrorCode()); } /** * Doc: (des="配置列表") * User: XMing * Date: 2020/11/6 * Time: 12:16 下午 */ public function getAll() { $result = $this->objMProcessSetting->getAll(); if ($result->isSuccess()) { parent::sendOutput($result->getData()); } parent::sendOutput($result->getData(), $result->getErrorCode()); } }