dataLists(new UserGroupLists()); } /** * @notes 添加用户分组 * @return \think\response\Json * @author BD * @date 2024/04/25 01:04 */ public function add() { $params = (new UserGroupValidate())->post()->goCheck('add'); $result = UserGroupLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(UserGroupLogic::getError()); } /** * @notes 编辑用户分组 * @return \think\response\Json * @author BD * @date 2024/04/25 01:04 */ public function edit() { $params = (new UserGroupValidate())->post()->goCheck('edit'); $result = UserGroupLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(UserGroupLogic::getError()); } /** * @notes 删除用户分组 * @return \think\response\Json * @author BD * @date 2024/04/25 01:04 */ public function delete() { $params = (new UserGroupValidate())->post()->goCheck('delete'); UserGroupLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取用户分组详情 * @return \think\response\Json * @author BD * @date 2024/04/25 01:04 */ public function detail() { $params = (new UserGroupValidate())->goCheck('detail'); $result = UserGroupLogic::detail($params); return $this->data($result); } /** * @notes 用户分组 * @return \think\response\Json * @author BD * @date 2024/03/19 02:29 */ public function setUserGroup() { $params = $this->request->post(); $result = UserGroupLogic::setUserGroup($params); if (true === $result) { return $this->success('分组成功', [], 1, 1); } return $this->fail(UserGroupLogic::getError()); } }