Blame view

src/main/java/com/objecteye/controller/RoleController.java 1.1 KB
c83b5b39   Liu Haoyu   项目创建, 集成spring-se...
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
35
36
37
38
39
40
41
42
43
  package com.objecteye.controller;
  
  import com.alibaba.fastjson.JSONObject;
  import com.objecteye.service.RoleServices;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.CrossOrigin;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.RestController;
  
  @CrossOrigin
  @RestController
  @RequestMapping("/vehicle/role")
  public class RoleController {
  
      @Autowired
      public RoleServices roleServices;
  
      /**
       * 角色列表分页展示
       *
       * @param currentpage
       * @param pagevolume
       * @return
       */
      @RequestMapping("/rolePage")
      public JSONObject rolePage(@RequestParam int currentpage, @RequestParam int pagevolume) {
          JSONObject rolePageInfo = roleServices.rolePage(currentpage, pagevolume);
  
          return rolePageInfo;
      }
  
      /**
       * 角色下拉列表展示
       *
       * @return
       */
      @RequestMapping("/roleDis")
      public JSONObject roleDis() {
          return roleServices.roleDis();
      }
  
  }