return->success(); } public function add() { $name = $this->request->input('chinese_name'); $account = $this->request->input('account'); $oldAccount = $this->adminUserModel->getAdminInfoByAccount($account); $oldName = $this->adminUserModel->getAdminInfoByName($name); if (!empty($oldName) && !empty($oldAccount)) throw new AdminException('账号或者员工已存在'); $salt = StringUtil::randStr(6); $model = new AdminUser(); $model->username = $account; $model->chinese_name = $name; $model->salt = $model->status = $this->request->input('status', 1); $model->avatar = $this->request->input('avatar',0); $model->role_id = $this->request->input('role_id', 0); $model->save(); return $this->return->success(); } public function edit() { return $this->return->success(); } public function delete() { return $this->return->success(); } public function get() { return $this->return->success(); } }