RoleController.java 880 Bytes
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
package com.lyms.cm.controller.sys;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.baomidou.mybatisplus.plugins.Page;
import com.lyms.cm.entity.sys.Role;
import com.lyms.cm.service.sys.RoleService;
import com.lyms.web.controller.BaseController;

@Controller
@RequestMapping("/role")
public class RoleController extends BaseController {
@Autowired
private RoleService roleService;
@RequestMapping("/list")
public String list() {
return "/role/role_list";
}

@RequestMapping("/getRoleList")
@ResponseBody
public Map<String, Object> getRoleList(){
Page<Role> page = getPage();
return toGridData(roleService.selectPage(page, null));
}
}