#
luxiaotao1123
2024-02-13 c1657f830ddd01fbe421c46ea2e139e1f7dd7567
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/controller/RoleController.java
@@ -2,12 +2,14 @@
import com.zy.asrs.framework.common.R;
import com.zy.asrs.wcs.common.annotation.OperationLog;
import com.zy.asrs.wcs.sys.entity.User;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created by vincent on 2/13/2024
@@ -16,11 +18,16 @@
@RequestMapping("/api")
public class RoleController extends BaseController {
    @PreAuthorize("hasAuthority('sys:auth:user')")
    @Autowired
    private RoleService roleService;
    @PreAuthorize("hasAuthority('sys:role:list')")
    @OperationLog
    @PutMapping("/role/page")
    public R updateInfo(@RequestBody User user) {
        return R.ok();
    @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);
    }
}