From 605da4de4eb14b1a61805e3e3597ef23a6d2a6d9 Mon Sep 17 00:00:00 2001 From: tangzh Date: Mon, 14 Jul 2025 16:44:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/rest/BusUserController.java | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/BusUserController.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/BusUserController.java index ee8f5bc..fa4c598 100644 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/BusUserController.java +++ b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/BusUserController.java @@ -1,18 +1,3 @@ -/* -* Copyright 2019-2025 Tz -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ package me.zhengjie.modules.system.rest; import me.zhengjie.annotation.Log; @@ -22,7 +7,10 @@ import me.zhengjie.modules.system.domain.dto.BusUserQueryCriteria; import me.zhengjie.modules.system.service.BusUserDeviceService; import me.zhengjie.modules.system.service.BusUserService; import lombok.RequiredArgsConstructor; + import java.util.List; +import java.util.Set; + import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; @@ -87,4 +75,14 @@ public class BusUserController { return new ResponseEntity<>(HttpStatus.NO_CONTENT); } + @ApiOperation("删除用户") + @DeleteMapping + @PreAuthorize("@el.check('busUser:del')") + public ResponseEntity deleteBusUser(@RequestBody Set ids){ + for (Long id : ids) { + busUserService.removeById(id); + } + return new ResponseEntity<>(HttpStatus.OK); + } + } \ No newline at end of file