前端传递数组参数到spring boot后台controller

hgl 1年前 ⋅ 481 阅读
belongSaler: function (salerId) {
var customerIds = $("#dataGrid").getGridParam("selarrrow");
$.ajax({
type: "POST",
url: baseURL + "offer/tCustomer/belongSaler",
data: {
salerId: salerId,
customerIds: customerIds
},
success: function (r) {
if (r.code === 0) {
msg('设置成功');
vm.reload();
} else {
alert(r.msg);
}
}
});
}
public R belongSaler(@RequestParam Long salerId, @RequestParam("customerIds[]") Long[] customerIds){
return R.ok();
}

注意:本文归作者所有,未经作者允许,不得转载

全部评论: 0

    我有话说: