package com.czg.service.order.mapper;

import com.czg.order.dto.CreditBuyerOrderDTO;
import com.czg.order.entity.CreditBuyerOrder;
import com.czg.order.param.CreditBuyerOrderQueryParam;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

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

/**
 * 挂账账单
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-03-04
 */
@Mapper
public interface CreditBuyerOrderMapper extends BaseMapper<CreditBuyerOrder> {

    List<CreditBuyerOrderDTO> findCreditBuyerOrderList(CreditBuyerOrderQueryParam param);

    long getCreditBuyerOrderCount(CreditBuyerOrderQueryParam param);

    BigDecimal getSumPayAmount(CreditBuyerOrderQueryParam param);

    BigDecimal getSumPaidAmount(CreditBuyerOrderQueryParam param);

    BigDecimal getSumUnpaidAmount(CreditBuyerOrderQueryParam param);

    CreditBuyerOrderDTO getOne(CreditBuyerOrderQueryParam param);

}