1.get方式调用时,参数需要加@RequestParam注解,且参数不能是对象。
@GetMapping(API_PREFIX + "/getAreaByCondition")
List<Area> getAreaByCondition(@RequestParam("station") String station);
2.post方式调用时,参数为对象时需要加@RequestBody注解,且只能有一个对象,即只能有一个@RequestBody注解。
@PostMapping(API_PREFIX + "/getForAreaManagement")
R<IPage<AreaVO>> getForAreaManagement(@RequestBody AreaVO area, @RequestParam("current") Integer current, @RequestParam("size") Integer size);
3596

被折叠的 条评论
为什么被折叠?



