#
luxiaotao1123
2024-02-13 edfa49f201d3fc8fc6b51b700e91f80246660855
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
package com.zy.asrs.wcs.sys.controller;
 
import com.zy.asrs.framework.common.R;
import com.zy.asrs.wcs.common.annotation.OperationLog;
import com.zy.asrs.wcs.sys.controller.param.PageParam;
import com.zy.asrs.wcs.sys.entity.Role;
import com.zy.asrs.wcs.sys.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * Created by vincent on 2/13/2024
 */
@RestController
@RequestMapping("/api")
public class RoleController extends BaseController {
 
    @Autowired
    private RoleService roleService;
 
    @PreAuthorize("hasAuthority('sys:role:list')")
    @OperationLog
    @PostMapping("/role/page")
    public R updateInfo(@RequestBody PageParam param) {
        System.out.println(param.get("condition"));
        List<Role> list = roleService.list();
        return R.ok().add(list);
    }
 
}