request->get(); $queue = new Queue(); $queue->load(['Queue' => $params]); if ($queue->validate()) { $res = $queue->createQueue(); echo json_encode(['code' => 200,'message' => 'OK','data' => ['name' => $res]]); } else { echo json_encode(['code' => 201,'message' => '']); } } /** * 删除队列 */ public function actionDeleteQueue() { $params = \Yii::$app->request->get(); $queue = new Queue(); $queue->load(['Queue' => $params]); if ($queue->validate()) { $res = $queue->deleteQueue(); echo json_encode(['code' => 200,'message' => 'OK','data' => [$res]]); } else { } } /** * 获取队列列表 */ public function actionListQueue() { $params = \Yii::$app->request->get(); $queue = new Queue(); $queue->load(['Queue' => $params]); if ($queue->validate()) { $res = $queue->listQueue(); echo json_encode(['code' => 200,'message' => 'OK','data' => $res]); } else { } } public function actionSetQueueAttributes() { } }