前端使用axios delete请求
deleteBrandList(
{
params: {
list: _this.array
},
paramsSerializer: function (params) {
return Qs.stringify(params, {arrayFormat: 'repeat'})
}
}
).then(function () {
_this.array = []
_this.loadData();
}).catch(function () {
_this.array = []
_this.loadData();
})
后端接收数据
必须要加上@RequestParam(value = "list",required = true)
public ResponseEntity<String> deleteByIds(@ApiParam("删除id列表")
@RequestParam(value = "list",required = true) List<Long> list)