mitao
2025-03-28 b44b174f656aac1fe03e7f96851e564c3982f67d
medicalWaste-admin/src/main/java/com/sinata/web/controller/backend/system/SysUserController.java
@@ -35,11 +35,13 @@
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@@ -135,9 +137,10 @@
     * @return
     */
    @ApiOperation("批量删除")
    @PostMapping("/delBatch")
    @ApiImplicitParam(name = "userIds", value = "用户id列表", required = true, allowMultiple = true)
    public R<?> delBatch(@RequestBody List<Long> userIds) {
    @DeleteMapping("/delBatch")
    @ApiImplicitParam(name = "userIdStr", value = "用户id字符串列表", required = true)
    public R<?> delBatch(@RequestParam String userIdStr) {
        List<Long> userIds = Arrays.stream(userIdStr.split(",")).map(Long::valueOf).collect(Collectors.toList());
        userService.delBatch(userIds);
        return R.ok();
    }