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.CustomerRecharge;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 客户充值记录接口
 * @author mumuxigua
 */
@Repository
public interface CustomerRechargeMapper extends BaseMapper<CustomerRecharge> {


    /**
     * 分页查询 客户缴费记录信息
     * @param page
     * @param customer
     * @return
     */
    IPage<List<CustomerRecharge>> selectAllByPage(Page page, @Param("customerRecharge") CustomerRecharge customer);

    /**
     * 分页查询客户缴费记录 余额>=0 的客户信息
     * @param page
     * @param customer
     * @return
     */
    IPage<List<CustomerRecharge>> selectAllByPageMoney(Page page, @Param("customerRecharge") CustomerRecharge customer);

    /**
     * 根据id删除客户缴费记录信息
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * 插入客户缴费记录信息
     * @param record
     * @return
     */
    @Override
    int insert(CustomerRecharge record);

    /**
     * 按照条件插入客户缴费记录信息
     * @param record
     * @return
     */
    int insertSelective(CustomerRecharge record);

    /**
     * 按照id查询客户缴费记录信息
     * @param id
     * @return
     */
    CustomerRecharge selectByPrimaryKey(Integer id);

    /**
     * 按照条件更新客户缴费记录信息
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(CustomerRecharge record);

    /**
     * 更新客户缴费记录信息
     * @param record
     * @return
     */
    int updateByPrimaryKey(CustomerRecharge record);

}