package com.zhongshu.card.server.core.service.openAPI;

import com.zhongshu.opengateway.client.model.OpenApiConfigModel;
import com.zhongshu.opengateway.client.model.SignModel;
import com.zhongshu.opengateway.client.model.param.AddApiParam;
import com.zhongshu.opengateway.client.model.param.LimitParam;
import com.zhongshu.opengateway.client.model.param.OpenApiSearchParam;
import com.zhongshu.opengateway.client.model.ret.ResultContent;
import com.zhongshu.opengateway.client.service.OpenApiConfigService;
import com.zhongshu.opengateway.client.service.OpenApiService;
import com.zhongshu.opengateway.client.service.SignService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Slf4j
@Service
public class OpenApiConfigManagerService {

    @Autowired
    OpenApiService openApiService;

    @Autowired
    SignService signService;

    @Autowired
    OpenApiConfigService openApiConfigService;

    public ResultContent quoteOpenApi(AddApiParam param){
        return openApiConfigService.quoteOpenApi(param);
    }


    public ResultContent pageByApp(OpenApiSearchParam param){

        return openApiConfigService.pageByApp(param);
    }

    public ResultContent pageAddList(OpenApiSearchParam param){
        return openApiService.pageAddList(param);
    }

    public ResultContent disable(String id){
        return openApiConfigService.disable(id);
    }

    public ResultContent delete(String id){
        return openApiConfigService.delete(id);
    }

    public ResultContent get(String id){
        return openApiConfigService.get(id);
    }

    public ResultContent setLimit(@RequestBody LimitParam limitParam){
        return openApiConfigService.setLimit(limitParam);
    }
}
