package com.ghb.base.modules.openapi.controller;

import com.ghb.base.common.api.vo.Result;
import com.ghb.base.common.system.base.controller.GhbController;
import com.ghb.base.modules.openapi.entity.OpenApiPermission;
import com.ghb.base.modules.openapi.service.OpenApiPermissionService;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/openapi/permission")
public class OpenApiPermissionController extends GhbController<OpenApiPermission, OpenApiPermissionService> {

    @PostMapping("add")
    public Result add(@RequestBody OpenApiPermission openApiPermission) {
        service.add(openApiPermission);
        return Result.ok("保存成功");
    }
    @GetMapping("/getOpenApi")
    public Result<?> getOpenApi( String apiAuthId) {
        return service.getOpenApi(apiAuthId);
    }
}
