postman 测试 @PathVariable Long[] ids 接口时:
使用:http://localhost:9202/point/channel/{46,47}?pageNum=1&pageSize=2和
http://localhost:9202/point/channel/[46,47]?pageNum=1&pageSize=2
均报错。
正确姿势如下:
接口:
@PreAuthorize(hasPermi = "communication:point:query")@GetMapping(value = "/channel/{ids}")public TableDataInfo getInfoByChannelId(@PathVariable Long[] ids) {startPage();List<IoChannelPoint> list = ioChannelPointService.selectIoChannelPointByIChannelId(ids);return getDataTable(list);}
postman测试:
注:
http://localhost:9202/point/channel/46,47?pageNum=1&pageSize=2
正常请求到,数字之间用,隔开。请求成功!
正常做个笔记,以备以后查看。
如果觉得《PostMan测试get请求 参数Long[]类型的接口》对你有帮助,请点赞、收藏,并留下你的观点哦!