58,452
社区成员




@InitBinder("pagehelper")
public void initBinder1(WebDataBinder binder) {
binder.setFieldDefaultPrefix("pagehelper.");
}
@InitBinder("eventlog")
public void initBinder2(WebDataBinder binder) {
binder.setFieldDefaultPrefix("eventlog.");
}
// 查询
@ResponseBody
@RequestMapping("/queryevent")
public DataGrid queryEvent(DoorguardEventlog eventlog,
DoorPageHelper pagehelper) throws Exception {
DataGrid dg = new DataGrid();
dg.setTotal(eventlogMapper.queryTotal(eventlog));
pagehelper.setStart((pagehelper.getPage() - 1) * pagehelper.getRows());
List<DoorguardEventlog> list = eventlogMapper.queryList(eventlog,
pagehelper);
dg.setRows(list);
return dg;
}
//查询
function queryClick() {
var eventdescr = $('#desc').val();
var eventctrlip = $('#ctrlip').val();
var eventcardno = $('#cardno').val();
var page = 1;
var start = 0;
var rows = $('#tbqueryInfo').datagrid('getPager').data("pagination").options.pageSize;
var datainfo ={"doorguardeventlog。eventdescr":eventdescr,"doorguardeventlog。eventctrlip":eventctrlip,"doorguardeventlog。eventcardno":eventcardno,"doorpagehelper.page":page,"doorpagehelper.start":start,"doorpagehelper.rows":rows}
$.ajax({
type : 'post',
url : '${pageContext.request.contextPath }/doorguard/queryevent.action',
contentType : 'application/json;charset=utf-8',
//contentType : "application/x-www-form-urlencoded;charset=utf-8",
dataType : "json",
async : false,
traditional:true,
data : datainfo,
//data : JSON.stringify(_page),
success : function(data) {
$('#tbqueryInfo').datagrid('loadData', data);
}
});
}