展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

springboot传参

  • 传入数组
@PostMapping("/delUsers")
public JSONResult delUsers(@RequestParam List<String> userIds) {
    int i = userMapper.deleteBatchIds(userIds);
    return new JSONResult(i);
}

  • 传入数组
@PostMapping("/downloadUser")
@ResponseBody
public void downloadUser(HttpServletResponse response, @RequestBody List<String> list) {
    reture null;
}

  • 传入文件
@PostMapping(value = "/importUser")
@ApiOperation(value = "批量导入", notes = "批量导入")
public JSONResult importUser(@RequestParam(value = "file") MultipartFile multiFile){
    return null
}

posted @ 2022-08-19 11:00  DogLeftover  阅读(38)  评论(0编辑  收藏  举报