@PostMapping("/{id}")
public R<Object> getById(@PathVariable("id") Integer id, @RequestBody List<String> ids) {
if (ids != null) {
return R.ok(x.xx(id,ids));
}else {
return R.ok(x.xx(id));
}
}
@RequsetParam 可以接受post请求,但是请求的contentType 为 form-data格式,而@RequestBody接受的请求方式application/json;charset=UTF-8