#
luxiaotao1123
2024-02-13 52a6d76d9a6c1c43f824b2aa4d2572478c49f7a0
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.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.common.domain.BaseParam;
import com.zy.asrs.wcs.common.domain.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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 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 BaseParam param) {
        PageParam<Role, BaseParam> page = new PageParam<>(param);
        return R.ok().add(roleService.page(page, page.getWrapper()));
    }
 
}