package com.ruoyi.dk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.dk.domain.Customer;
import com.ruoyi.dk.dto.admin.resp.CustomerAdminResp;
import com.ruoyi.dk.dto.admin.resp.CustomerExportVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface CustomerMapper extends BaseMapper<Customer> {

    void incsAmount(@Param("customerId") Long customerId, @Param("totalLoanMoney") BigDecimal totalLoanMoney,
                    @Param("totalRepayment") BigDecimal totalRepayment);

    void withdraw(@Param("customerId") Long customerId, @Param("withdrawAmount") Double withdrawAmount);

    IPage<CustomerAdminResp> pageAdmin(@Param("page") IPage<Object> page, @Param("bo") CustomerAdminResp bo);

    List<CustomerExportVo> exportAdmin(@Param("bo") CustomerAdminResp bo);
}
