package com.czg.controller.admin;

import com.czg.account.entity.ShopPermission;
import com.czg.account.service.ShopPermissionService;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Administrator
 */
@RestController
@RequestMapping("/admin/shopPermission")
public class ShopPermissionController {
    @Resource
    private ShopPermissionService shopPermissionService;

    /**
     * 获取店铺权限列表
     * @return 权限列表
     */
    @SaAdminCheckPermission(parentName = "店铺权限",value = "shopPermission:list", name = "店铺权限列表")
    @GetMapping
    public CzgResult<List<ShopPermission>> getPermission() {
        return CzgResult.success(shopPermissionService.getPermission());
    }
}
