package com.jkcredit.invoice.service.customer.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jkcredit.invoice.mapper.customer.CustomerRechargeMapper;
import com.jkcredit.invoice.model.entity.CustomerRecharge;
import com.jkcredit.invoice.service.customer.CustomerRechargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 客户充值记录接口实现类
 * @author mumuxigua
 */
@Service("customerRechargeService")
public class CustomerRechargeServiceImpl extends ServiceImpl<CustomerRechargeMapper, CustomerRecharge> implements CustomerRechargeService {
    @Autowired
    CustomerRechargeMapper customerRechargeMapper;

    /**
     * 查找所有充值信息
     *
     * @param page
     * @param customerRecharge
     * @return
     */
    @Override
    public IPage findAllCustomerRecharge(Page page, CustomerRecharge customerRecharge) {
        return customerRechargeMapper.selectAllByPage(page, customerRecharge);
    }


    /**
     * 按照客户维度查询充值信息
     *
     * @param page
     * @param customerRecharge
     * @return
     */
    @Override
    public IPage findAllCustomerRechargeMoney(Page page, CustomerRecharge customerRecharge) {
        return customerRechargeMapper.selectAllByPageMoney(page, customerRecharge);
    }
}
