package com.chuanxia.mcp.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chuanxia.mcp.bean.dto.DomainBindDto;
import com.chuanxia.mcp.bean.dto.DomainQueryDto;
import com.chuanxia.mcp.bean.model.CdnDomain;
import com.chuanxia.mcp.bean.vo.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;

public interface CdnDoaminService extends IService<CdnDomain> {
    Result<IPage<CdnDomain>> listPage(DomainQueryDto queryDto);

    Result<String> saveDomain(CdnDomain domain);

    Result<String> bindCdn(DomainBindDto bindDto);

    Result<String> updateDomain(CdnDomain domain);

    Result getCdnByVideoId(String videoId, BigDecimal internetSpeed, String operatorName, String type, HttpServletRequest request);

    Result downLoadM3u8File(String cdn, Integer id, HttpServletResponse response);
}
