package com.jkcredit.invoice.mapper.customer;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jkcredit.invoice.model.entity.customer.CustomerEtcChangeInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 企业换绑接口
 * @author mumuxigua
 */
@Repository
public interface CustomerChangeInfoMapper extends BaseMapper<CustomerEtcChangeInfo> {
    /**
     * 客户换绑数据插入
     * @param custometEtcChangeInfo
     */
    void insertCardChangeInfo(CustomerEtcChangeInfo custometEtcChangeInfo);

    /**
     * 客户换绑记录按照请求ID和卡号插入
     * @param applyId
     * @param cardId
     */
    void insertChangeCard(@Param("applyId") String applyId, @Param("cardId") String cardId);

    /**
     * 查询换绑记录
     * @param applyId
     * @return
     */
    List<Map<String, String>> selectChangeCards(String applyId);

    /**
     * 分页查询换绑记录
     * @param page
     * @param custometEtcChangeInfo
     * @return
     */
    IPage<List<CustomerEtcChangeInfo>> selectAllByPage(Page page, @Param("custometEtcChangeInfo") CustomerEtcChangeInfo custometEtcChangeInfo);
}
