| | |
| | | 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; |
| | | |
| | |
| | | * @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(); |
| | | } |