
package com.tmerclub.cloud.supplier.service;

import com.tmerclub.cloud.api.supplier.vo.SupplierApiDetailVO;
import com.tmerclub.cloud.api.supplier.vo.SupplierBankCardVO;
import com.tmerclub.cloud.supplier.dto.AllinpaySupplierBankCardDTO;
import com.tmerclub.cloud.supplier.dto.SupplierBankCardDTO;
import com.tmerclub.cloud.supplier.vo.SupplierCompanyVO;

import java.util.List;

/**
 * 银行卡信息
 *
 * @author lhd
 * @date 2022-03-14 17:04:32
 */
public interface SupplierBankCardService {
    /**
     * 批量新增结算银行账户
     * @param supplierBankCardDTOList
     * @param supplierId
     */
    void insertBatch(List<SupplierBankCardDTO> supplierBankCardDTOList, Long supplierId);

    /**
     * 根据供应商id获取银行卡列表
     * @param supplierId
     * @return
     */
    List<SupplierBankCardVO> listBySupplierId(Long supplierId);

    /**
     * 根据银行卡id删除银行卡信息
     * @param supplierBankCardId
     * @param supplierId
     */
    void deleteBySupplierBankCardId(Long supplierBankCardId, Long supplierId);


    /**
     * 将对公户信息和之前提交的工商信息一起交给通联去审核
     * @param allinpaySupplierBankCardDTO
     * @param supplierId
     * @param supplierCompanyVO
     */
    void insertAndSetCompanyInfo(AllinpaySupplierBankCardDTO allinpaySupplierBankCardDTO, Long supplierId, SupplierCompanyVO supplierCompanyVO);

    /**
     * 通联设置企业信息
     * @param allinpaySupplierBankCardDTO
     * @param supplierId
     * @param supplierCompanyVO
     * @param supplierDetail
     */
    void allinpaySetCompanyInfo(AllinpaySupplierBankCardDTO allinpaySupplierBankCardDTO, Long supplierId, SupplierCompanyVO supplierCompanyVO, SupplierApiDetailVO supplierDetail);

    /**
     * 更新通联供应商状态
     * @param supplierId
     */
    void updateSupplierAllinpayStatusToSuccess(Long supplierId);

    /**
     * 批量新增结算银行账户并提交开店申请
     * @param supplierBankCardDTOList
     * @param supplierId
     */
    void insertBatchAndSubmitApply(List<SupplierBankCardDTO> supplierBankCardDTOList, Long supplierId);

    /**
     * 更新供应商银行卡信息
     * @param supplierBankCardDTO 银行卡信息
     * @param supplierId 供应商id
     */
    void updateBySupplierId(SupplierBankCardDTO supplierBankCardDTO, Long supplierId);

    /**
     * 设置银行卡为主账号
     * @param supplierBankCardId
     * @param supplierId
     */
    void setPrimaryBySupplierId(Long supplierBankCardId, Long supplierId);

    /**
     * 设置银行卡不为主账号
     * @param supplierBankCardId
     * @param supplierId
     */
    void setNotPrimaryBySupplierId(Long supplierBankCardId, Long supplierId);

    /**
     * 保存单个银行卡信息
     * @param supplierBankCardDTO
     * @param supplierId
     */
    void insertBySupplierId(SupplierBankCardDTO supplierBankCardDTO, Long supplierId);

    /**
     * 根据银行卡id获取银行卡信息
     * @param supplierBankCardId
     * @return
     */
    SupplierBankCardVO getBySupplierBankCardId(Long supplierBankCardId);

    /**
     * 根据银行卡id与供应商id获取银行卡信息
     * @param supplierBankCardId
     * @param supplierId
     * @return
     */
    SupplierBankCardVO getBySupplierBankCardIdAndSupplierId(Long supplierBankCardId, Long supplierId);

    /**
     * 删除供应商绑定银行卡信息
     * @param supplierId
     */
    void deleteBySupplierId(Long supplierId);

    /**
     * 刷新银行卡
     * @param supplierId
     */
    void refresh(Long supplierId);
}
