@JFinal 第一次尝试Delete请求,碰到接收不到参数情况。// 前台请求:
$.ajax({
method: 'DELETE',
url: opt.url,
data: {
id: record['id'],
remark: record[opt.treeField]
}
}).done(function (data) {
if (data.code == 200) {
showToast(lang.deleteSuccess);
dg.treegrid('reload');
}
});
后台:// delete
else if (method.equalsIgnoreCase(Const.DELETE)) {
Long id = getParaToLong("id", null);
if (id != null && Resource.dao.deleteById(id))
success(Constants.SUCCESS_DELETE);
else
error(Constants.ERROR_DELETE);
}