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.remittance.channel.SysRemittanceChannelDto;
import com.crm.rely.backend.model.dto.sys.remittance.channel.SysRemittanceChannelGetCodeDto;
import com.crm.rely.backend.model.entity.sys.remittance.channel.*;
import com.crm.rely.backend.model.pojo.table.SysRemittanceChannelTable;

import java.util.List;

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

    /**
     * 根据条件获取所有通道列表
     *
     * @return
     * @throws Exception
     */
    BaseResultDto<List<SysRemittanceChannelDto>> getAllList(SysRemittanceChannelListEntity entity) throws Exception;

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

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

    SysRemittanceChannelTable getByCode(String code, boolean valid) throws Exception;


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

    SysRemittanceChannelTable getSysRemittanceChannelByCode(String code, boolean valid) throws ServiceException;


    void save(SysRemittanceChannelBatchUpdateEntity entity, List<SysRemittanceChannelBasehUpdateEntity> entitys) throws ServiceException;

    /**
     * 查询入金通道
     *
     * @param entity
     * @return
     * @throws ServiceException
     */
    ResultWithPagerDto<SysRemittanceChannelDto> searchPageList(SysRemittanceChannelSearchEntity entity) throws ServiceException;

    List<SysRemittanceChannelDto> searchList() throws ServiceException;

    List<SysRemittanceChannelGetCodeDto> getCodeList() throws ServiceException;

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

}
