package com.yc.ship.module.ota.api;

import com.yc.ship.framework.common.pojo.CommonResult;
import com.yc.ship.module.ota.api.dto.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.tags.Tag;

import javax.annotation.security.PermitAll;
import javax.validation.Valid;
import java.util.List;

@Tag(name = "API 服务 - 订单")
public interface OtaDistributorApi {
    /**
     * 根据登录用户id获取分销商信息
     *
     * @param loginUserId
     * @return
     */
    DistributorRespDTO getDistributorByLoginUserId(Long loginUserId);

    DistributorRespDTO getDistributorById(Long id);

    CommonResult<?> distributorCMBRecharge(DistributorSelfRechargeReqDTO payNotifyReqDTO);

    /**
     * 分销商交易充值
     *
     * @param rechargeReqDTO
     * @return
     */
    CommonResult<DistributorRechargeRespDTO> tradeRecharge(DistributorRechargeReqDTO rechargeReqDTO);

    CommonResult<DistributorProductRespDTO> getDistributorProductById(Long distributorProductId);

    CommonResult<List<DistributorProductRespDTO.DistributorProjectDTO>> getProductByDistributor(Long distributorId, Long productId, String distributorProductId);


    CommonResult<DistributorProductRespDTO> getCalendarProductById(Long distributorProductId, String useDate);

    CommonResult<DistributorRespDTO> getDistributorByOtaAccount(String otaAccount, String typeCode);

    CommonResult<DistributorProductRespDTO> getAgencyCalendarRangeProductById(Long distributorProductId, String startDate, String endDate);

    CommonResult<DistributorProductRespDTO> getDistributorProductByProductAndDistributor(Long productId, Long distributorId);

    CommonResult<List<DistributorProductRespDTO>> getProductListPageByDistributorId(Long distributorId, int pageIndex, int pageSize);

    CommonResult<DistributorRespDTO> getDistributorByAccountTenantId(Long accountTenantId);

    CommonResult<?> distributorSelfRecharge(DistributorSelfRechargeReqDTO payNotifyReqDTO);

    CommonResult<DistributorRespDTO> getDistributorByLoginUser(String loginName);

    /**
     * 根据经销商类型获取分销商列表
     *
     * @param type
     * @return
     */
    List<DistributorRespDTO> getDistributorList(Integer type);
}
