Commit 0ef7fdd087868feab07c083e1c5fdd70a72c3769

Authored by fangcheng
1 parent 8eaeb3c360
Exists in master

修改获取一页数据

Showing 2 changed files with 24 additions and 2 deletions

center.manager/src/main/java/com/lyms/cm/controller/sys/SysRolesController.java View file @ 0ef7fdd
1 1 package com.lyms.cm.controller.sys;
2 2  
  3 +
3 4 import org.springframework.stereotype.Controller;
4 5 import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.ResponseBody;
  7 +
  8 +import com.baomidou.mybatisplus.plugins.Page;
  9 +import com.lyms.cm.entity.sys.SysRoles;
  10 +import com.lyms.cm.service.sys.SysRolesService;
5 11 import com.lyms.web.controller.BaseController;
6 12  
7 13 /**
... ... @@ -15,6 +21,21 @@
15 21 @Controller
16 22 @RequestMapping("/sysRoles")
17 23 public class SysRolesController extends BaseController {
  24 +
  25 + private SysRolesService sysRolesService;
  26 +
  27 +
  28 + @RequestMapping("/list")
  29 + public String list() {
  30 + return "/role/role_list";
  31 + }
  32 +
  33 + @RequestMapping("/getRoleList")
  34 + @ResponseBody
  35 + public java.util.Map<String, Object> getRoleList(){
  36 + Page<SysRoles> page = getPage();
  37 + return toGridData(sysRolesService.selectPage(page));
  38 + }
18 39  
19 40 }
center.manager/src/main/resources/xml/app-shiro.xml View file @ 0ef7fdd
... ... @@ -45,12 +45,13 @@
45 45 </property>
46 46 <property name="filterChainDefinitions">
47 47 <value>
48   - /login = anon
  48 + <!-- /login = anon
49 49 /sysUsers/** =anon
50 50 /logout = logout
51 51 /static/** = anon
52 52 /authenticated = authc
53   - /** = user,forceLogout
  53 + /** = user,forceLogout -->
  54 + /** = anon
54 55 </value>
55 56 </property>
56 57 </bean>