package com.crm.pay.service;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.exception.ServiceException;
import com.crm.rely.backend.model.dto.sys.remit.SysRemitChannelApiDto;
import com.crm.rely.backend.model.dto.sys.remit.SysRemitChannelDto;
import com.crm.rely.backend.model.dto.sys.remit.SysRemitChannelGetCodeDto;
import com.crm.rely.backend.model.entity.sys.remit.*;
import com.crm.rely.backend.model.pojo.table.SysRemitChannelTable;

import java.util.List;

/**
 * @author houn
 */
public interface SysRemitChannelService {

    BaseResultDto<List<SysRemitChannelDto>> getAllList(SysRemitChannelListEntity entity) throws Exception;

    /**
     * 根据条件 获取单个通道信息
     *
     * @param entity
     * @return
     * @throws Exception
     */
    BaseResultDto<SysRemitChannelDto> get(SysRemitChannelByCodeEntity entity) throws Exception;

    List<SysRemitChannelGetCodeDto> getCodeList() throws ServiceException;

    /**
     * 根据code 获取单个通道信息
     *
     * @param code
     * @return
     * @throws Exception
     */
    SysRemitChannelDto getByCode(String code) throws Exception;

    /**
     * 根据code 获取通道实体
     *
     * @param code
     * @return
     */
    SysRemitChannelTable getSysRemitChannelByCode(String code) throws ServiceException;

    SysRemitChannelTable getRemitChannelByCode(String code) throws ServiceException;

    void save(SysRemitChannelBatchUpdateEntity entity, List<SysRemitChannelBaseUpdateEntity> entitys) throws ServiceException;

    /**
     * 查询出金通道
     *
     * @param entity
     * @return
     * @throws ServiceException
     */
    ResultWithPagerDto<SysRemitChannelDto> searchPageList(SysRemitChannelSearchEntity entity) throws ServiceException;

    List<SysRemitChannelDto> searchList() throws ServiceException;

    /**
     * 单个获取出金通道信息
     *
     * @param entity
     * @return
     * @throws ServiceException
     */
    SysRemitChannelDto searchSingle(SingleLongEntity entity) throws ServiceException;

    List<SysRemitChannelApiDto> searchWithdrawApi() throws ServiceException;

}
