package com.usoft.fin.grpc.dal.mapper;

import com.usoft.fin.grpc.dal.entity.RepayDetail;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

public interface RepayDetailMapper {
    /**
     * deleteByPrimaryKey
     * 
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert
     * 
     * @param record
     * @return int
     */
    int insert(RepayDetail record);

    /**
     * insertSelective
     * 
     * @param record
     * @return int
     */
    int insertSelective(RepayDetail record);

    /**
     * selectByPrimaryKey
     * 
     * @param id
     * @return RepayDetail
     */
    RepayDetail selectByPrimaryKey(Integer id);

    /**
     * updateByPrimaryKeySelective
     * 
     * @param record
     * @return int
     */
    int updateByPrimaryKeySelective(RepayDetail record);

    /**
     * updateByPrimaryKey
     * 
     * @param record
     * @return int
     */
    int updateByPrimaryKey(RepayDetail record);

    /**
     * insertAllSelective
     *
     * @param repayDetails
     * @return
     */
    int insertAllSelective(Collection<RepayDetail> repayDetails);

    /**
     * 根据还款申请编号删除所有还款申请信息
     * @param repayCode 还款申请编号
     * @return
     */
    int deleteAllByRepayCode(@Param("repayCode") String repayCode);

    /**
     * 根据还款编号查询还款明细
     * @param repayCode 还款编号
     * @return
     */
    List<RepayDetail> findByRepayCode(String repayCode);
}