支持动态翻页
This commit is contained in:
parent
6fe3cb33c3
commit
17c6e3b826
|
@ -16,7 +16,9 @@ import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织controller
|
* 组织controller
|
||||||
|
@ -49,14 +51,18 @@ public class UpmsOrganizationController extends BaseController {
|
||||||
@RequestParam(required = false, value = "sort") String sort,
|
@RequestParam(required = false, value = "sort") String sort,
|
||||||
@RequestParam(required = false, value = "order") String order) {
|
@RequestParam(required = false, value = "order") String order) {
|
||||||
// 数据列表
|
// 数据列表
|
||||||
UpmsOrganizationExample upmsupmsOrganizationExample = new UpmsOrganizationExample();
|
UpmsOrganizationExample upmsOrganizationExample = new UpmsOrganizationExample();
|
||||||
upmsupmsOrganizationExample.setOffset(offset);
|
upmsOrganizationExample.setOffset(offset);
|
||||||
upmsupmsOrganizationExample.setLimit(limit);
|
upmsOrganizationExample.setLimit(limit);
|
||||||
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
||||||
upmsupmsOrganizationExample.setOrderByClause(sort + " " + order);
|
upmsOrganizationExample.setOrderByClause(sort + " " + order);
|
||||||
}
|
}
|
||||||
List<UpmsOrganization> organizations = upmsOrganizationService.selectByExample(upmsupmsOrganizationExample);
|
List<UpmsOrganization> rows = upmsOrganizationService.selectByExample(upmsOrganizationExample);
|
||||||
return organizations;
|
long total = upmsOrganizationService.countByExample(upmsOrganizationExample);
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("total", total);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增组织")
|
@ApiOperation(value = "新增组织")
|
||||||
|
|
|
@ -15,7 +15,9 @@ import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限controller
|
* 权限controller
|
||||||
|
@ -73,8 +75,12 @@ public class UpmsPermissionController extends BaseController {
|
||||||
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
||||||
upmsPermissionExample.setOrderByClause(sort + " " + order);
|
upmsPermissionExample.setOrderByClause(sort + " " + order);
|
||||||
}
|
}
|
||||||
List<UpmsPermission> permissions = upmsPermissionService.selectByExample(upmsPermissionExample);
|
List<UpmsPermission> rows = upmsPermissionService.selectByExample(upmsPermissionExample);
|
||||||
return permissions;
|
long total = upmsPermissionService.countByExample(upmsPermissionExample);
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("total", total);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增权限")
|
@ApiOperation(value = "新增权限")
|
||||||
|
|
|
@ -15,7 +15,9 @@ import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色controller
|
* 角色controller
|
||||||
|
@ -54,8 +56,12 @@ public class UpmsRoleController extends BaseController {
|
||||||
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
||||||
upmsRoleExample.setOrderByClause(sort + " " + order);
|
upmsRoleExample.setOrderByClause(sort + " " + order);
|
||||||
}
|
}
|
||||||
List<UpmsRole> roles = upmsRoleService.selectByExample(upmsRoleExample);
|
List<UpmsRole> rows = upmsRoleService.selectByExample(upmsRoleExample);
|
||||||
return roles;
|
long total = upmsRoleService.countByExample(upmsRoleExample);
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("total", total);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增角色")
|
@ApiOperation(value = "新增角色")
|
||||||
|
|
|
@ -15,7 +15,9 @@ import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统controller
|
* 系统controller
|
||||||
|
@ -51,9 +53,15 @@ public class UpmsSystemController extends BaseController {
|
||||||
UpmsSystemExample upmsSystemExample = new UpmsSystemExample();
|
UpmsSystemExample upmsSystemExample = new UpmsSystemExample();
|
||||||
upmsSystemExample.setOffset(offset);
|
upmsSystemExample.setOffset(offset);
|
||||||
upmsSystemExample.setLimit(limit);
|
upmsSystemExample.setLimit(limit);
|
||||||
List<UpmsSystem> systems = upmsSystemService.selectByExample(upmsSystemExample);
|
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
||||||
// long total = upmsSystemService.countByExample(upmsSystemExample);
|
upmsSystemExample.setOrderByClause(sort + " " + order);
|
||||||
return systems;
|
}
|
||||||
|
List<UpmsSystem> rows = upmsSystemService.selectByExample(upmsSystemExample);
|
||||||
|
long total = upmsSystemService.countByExample(upmsSystemExample);
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("total", total);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增系统")
|
@ApiOperation(value = "新增系统")
|
||||||
|
|
|
@ -15,7 +15,9 @@ import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户controller
|
* 用户controller
|
||||||
|
@ -54,8 +56,12 @@ public class UpmsUserController extends BaseController {
|
||||||
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
||||||
upmsUserExample.setOrderByClause(sort + " " + order);
|
upmsUserExample.setOrderByClause(sort + " " + order);
|
||||||
}
|
}
|
||||||
List<UpmsUser> users = upmsUserService.selectByExample(upmsUserExample);
|
List<UpmsUser> rows = upmsUserService.selectByExample(upmsUserExample);
|
||||||
return users;
|
long total = upmsUserService.countByExample(upmsUserExample);
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("rows", rows);
|
||||||
|
result.put("total", total);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增用户")
|
@ApiOperation(value = "新增用户")
|
||||||
|
|
|
@ -49,13 +49,21 @@ $(function() {
|
||||||
detailView: true,
|
detailView: true,
|
||||||
detailFormatter: 'detailFormatter',
|
detailFormatter: 'detailFormatter',
|
||||||
pagination: true,
|
pagination: true,
|
||||||
|
paginationLoop: false,
|
||||||
|
sidePagination: 'server',
|
||||||
|
silentSort: false,
|
||||||
|
smartDisplay: false,
|
||||||
|
escape: true,
|
||||||
|
searchOnEnterKey: true,
|
||||||
|
idField: 'organizationId',
|
||||||
|
maintainSelected: true,
|
||||||
toolbar: '#toolbar',
|
toolbar: '#toolbar',
|
||||||
columns: [
|
columns: [
|
||||||
{field: 'state', checkbox: true},
|
{field: 'state', checkbox: true},
|
||||||
{field: 'organizationId', title: '编号', sortable: true, align: 'center'},
|
{field: 'organizationId', title: '编号', sortable: true, align: 'center'},
|
||||||
{field: 'name', title: '组织名称'},
|
{field: 'name', title: '组织名称'},
|
||||||
{field: 'description', title: '组织描述'},
|
{field: 'description', title: '组织描述'},
|
||||||
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents'}
|
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents', clickToSelect: false}
|
||||||
]
|
]
|
||||||
}).on('all.bs.table', function (e, name, args) {
|
}).on('all.bs.table', function (e, name, args) {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
|
@ -49,6 +49,14 @@ $(function() {
|
||||||
detailView: true,
|
detailView: true,
|
||||||
detailFormatter: 'detailFormatter',
|
detailFormatter: 'detailFormatter',
|
||||||
pagination: true,
|
pagination: true,
|
||||||
|
paginationLoop: false,
|
||||||
|
sidePagination: 'server',
|
||||||
|
silentSort: false,
|
||||||
|
smartDisplay: false,
|
||||||
|
escape: true,
|
||||||
|
searchOnEnterKey: true,
|
||||||
|
idField: 'permissionId',
|
||||||
|
maintainSelected: true,
|
||||||
toolbar: '#toolbar',
|
toolbar: '#toolbar',
|
||||||
columns: [
|
columns: [
|
||||||
{field: 'state', checkbox: true},
|
{field: 'state', checkbox: true},
|
||||||
|
@ -61,7 +69,7 @@ $(function() {
|
||||||
{field: 'uri', title: '路径'},
|
{field: 'uri', title: '路径'},
|
||||||
{field: 'icon', title: '图标', align: 'center', formatter: 'iconFormatter'},
|
{field: 'icon', title: '图标', align: 'center', formatter: 'iconFormatter'},
|
||||||
{field: 'status', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
{field: 'status', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
||||||
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents'}
|
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents', clickToSelect: false}
|
||||||
]
|
]
|
||||||
}).on('all.bs.table', function (e, name, args) {
|
}).on('all.bs.table', function (e, name, args) {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
|
@ -49,6 +49,14 @@ $(function() {
|
||||||
detailView: true,
|
detailView: true,
|
||||||
detailFormatter: 'detailFormatter',
|
detailFormatter: 'detailFormatter',
|
||||||
pagination: true,
|
pagination: true,
|
||||||
|
paginationLoop: false,
|
||||||
|
sidePagination: 'server',
|
||||||
|
silentSort: false,
|
||||||
|
smartDisplay: false,
|
||||||
|
escape: true,
|
||||||
|
searchOnEnterKey: true,
|
||||||
|
idField: 'permissionId',
|
||||||
|
maintainSelected: true,
|
||||||
toolbar: '#toolbar',
|
toolbar: '#toolbar',
|
||||||
columns: [
|
columns: [
|
||||||
{field: 'state', checkbox: true},
|
{field: 'state', checkbox: true},
|
||||||
|
@ -61,7 +69,7 @@ $(function() {
|
||||||
{field: 'uri', title: '路径'},
|
{field: 'uri', title: '路径'},
|
||||||
{field: 'icon', title: '图标', align: 'center', formatter: 'iconFormatter'},
|
{field: 'icon', title: '图标', align: 'center', formatter: 'iconFormatter'},
|
||||||
{field: 'status', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
{field: 'status', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
||||||
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents'}
|
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents', clickToSelect: false}
|
||||||
]
|
]
|
||||||
}).on('all.bs.table', function (e, name, args) {
|
}).on('all.bs.table', function (e, name, args) {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
|
@ -49,6 +49,14 @@ $(function() {
|
||||||
detailView: true,
|
detailView: true,
|
||||||
detailFormatter: 'detailFormatter',
|
detailFormatter: 'detailFormatter',
|
||||||
pagination: true,
|
pagination: true,
|
||||||
|
paginationLoop: false,
|
||||||
|
sidePagination: 'server',
|
||||||
|
silentSort: false,
|
||||||
|
smartDisplay: false,
|
||||||
|
escape: true,
|
||||||
|
searchOnEnterKey: true,
|
||||||
|
idField: 'permissionId',
|
||||||
|
maintainSelected: true,
|
||||||
toolbar: '#toolbar',
|
toolbar: '#toolbar',
|
||||||
columns: [
|
columns: [
|
||||||
{field: 'state', checkbox: true},
|
{field: 'state', checkbox: true},
|
||||||
|
@ -61,7 +69,7 @@ $(function() {
|
||||||
{field: 'uri', title: '路径'},
|
{field: 'uri', title: '路径'},
|
||||||
{field: 'icon', title: '图标', align: 'center', formatter: 'iconFormatter'},
|
{field: 'icon', title: '图标', align: 'center', formatter: 'iconFormatter'},
|
||||||
{field: 'status', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
{field: 'status', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
||||||
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents'}
|
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents', clickToSelect: false}
|
||||||
]
|
]
|
||||||
}).on('all.bs.table', function (e, name, args) {
|
}).on('all.bs.table', function (e, name, args) {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
|
@ -49,13 +49,21 @@ $(function() {
|
||||||
detailView: true,
|
detailView: true,
|
||||||
detailFormatter: 'detailFormatter',
|
detailFormatter: 'detailFormatter',
|
||||||
pagination: true,
|
pagination: true,
|
||||||
|
paginationLoop: false,
|
||||||
|
sidePagination: 'server',
|
||||||
|
silentSort: false,
|
||||||
|
smartDisplay: false,
|
||||||
|
escape: true,
|
||||||
|
searchOnEnterKey: true,
|
||||||
|
idField: 'roleId',
|
||||||
|
maintainSelected: true,
|
||||||
toolbar: '#toolbar',
|
toolbar: '#toolbar',
|
||||||
columns: [
|
columns: [
|
||||||
{field: 'state', checkbox: true},
|
{field: 'state', checkbox: true},
|
||||||
{field: 'roleId', title: '编号', sortable: true, align: 'center'},
|
{field: 'roleId', title: '编号', sortable: true, align: 'center'},
|
||||||
{field: 'name', title: '角色名称'},
|
{field: 'name', title: '角色名称'},
|
||||||
{field: 'description', title: '角色描述'},
|
{field: 'description', title: '角色描述'},
|
||||||
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents'}
|
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents', clickToSelect: false}
|
||||||
]
|
]
|
||||||
}).on('all.bs.table', function (e, name, args) {
|
}).on('all.bs.table', function (e, name, args) {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
|
@ -50,8 +50,8 @@ $(function() {
|
||||||
detailFormatter: 'detailFormatter',
|
detailFormatter: 'detailFormatter',
|
||||||
pagination: true,
|
pagination: true,
|
||||||
paginationLoop: false,
|
paginationLoop: false,
|
||||||
// sidePagination: 'server',
|
sidePagination: 'server',
|
||||||
// silentSort: false,
|
silentSort: false,
|
||||||
smartDisplay: false,
|
smartDisplay: false,
|
||||||
escape: true,
|
escape: true,
|
||||||
searchOnEnterKey: true,
|
searchOnEnterKey: true,
|
||||||
|
|
|
@ -49,6 +49,14 @@ $(function() {
|
||||||
detailView: true,
|
detailView: true,
|
||||||
detailFormatter: 'detailFormatter',
|
detailFormatter: 'detailFormatter',
|
||||||
pagination: true,
|
pagination: true,
|
||||||
|
paginationLoop: false,
|
||||||
|
sidePagination: 'server',
|
||||||
|
silentSort: false,
|
||||||
|
smartDisplay: false,
|
||||||
|
escape: true,
|
||||||
|
searchOnEnterKey: true,
|
||||||
|
idField: 'userId',
|
||||||
|
maintainSelected: true,
|
||||||
toolbar: '#toolbar',
|
toolbar: '#toolbar',
|
||||||
columns: [
|
columns: [
|
||||||
{field: 'state', checkbox: true},
|
{field: 'state', checkbox: true},
|
||||||
|
@ -60,7 +68,7 @@ $(function() {
|
||||||
{field: 'email', title: '邮箱'},
|
{field: 'email', title: '邮箱'},
|
||||||
{field: 'sex', title: '性别', formatter: 'sexFormatter'},
|
{field: 'sex', title: '性别', formatter: 'sexFormatter'},
|
||||||
{field: 'locked', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
{field: 'locked', title: '状态', sortable: true, align: 'center', formatter: 'statusFormatter'},
|
||||||
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents'}
|
{field: 'action', title: '操作', align: 'center', formatter: 'actionFormatter', events: 'actionEvents', clickToSelect: false}
|
||||||
]
|
]
|
||||||
}).on('all.bs.table', function (e, name, args) {
|
}).on('all.bs.table', function (e, name, args) {
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
Loading…
Reference in New Issue