package com.kym.admin.controller;

import com.kym.common.R;
import com.kym.service.admin.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 权限 前端控制器
 * </p>
 *
 * @author skyline
 * @since 2023-09-23
 */
@RestController
@RequestMapping("/permission")
public class PermissionController {

    private PermissionService permissionService;

    @Autowired
    public void setPermissionService(PermissionService permissionService) {
        this.permissionService = permissionService;
    }

    @GetMapping("listPermission")
    R listPermission() {
        var res = permissionService.lambdaQuery().list();
        return R.success(res);
    }

}
