model
分页查询
Paginator paginator = new Paginator(Role.class, size, (roleName == null && roleCode == null) ? "1=1"
: "ROLE_NAME LIKE '%" + roleName + "%' OR ROLE_CODE LIKE '%" + roleCode + "%'");
long count = paginator.getCount();
优化后
地方
model
分页查询
Paginator paginator = new Paginator(Role.class, size, (roleName == null && roleCode == null) ? "1=1"
: "ROLE_NAME LIKE '%" + roleName + "%' OR ROLE_CODE LIKE '%" + roleCode + "%'");
long count = paginator.getCount();