package com.ai.da.mapper.primary;

import com.ai.da.mapper.primary.entity.PaymentInfo;
import com.ai.da.model.vo.OrderListVO;
import com.ai.da.model.vo.PaymentInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

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

public interface PaymentInfoMapper extends BaseMapper<PaymentInfo> {

    List<OrderListVO> selectPageOrderList(Long accountId, String startTime, String endTime, int offset, int pageSize, Long id);

    int queryOrderListTotalCount(Long accountId, String startTime, String endTime, Long id);

    List<PaymentInfoVO> queryPaymentInfo(String paymentType,String payerTotal, String type, String status,
                                         String country, String city, String startTime, String endTime,
                                         int limit, int offset, String order, String payer
    );

    Long queryPaymentInfoCount(String paymentType,String payerTotal, String type, String status,
                                         String country, String city, String startTime, String endTime, String payer
    );

    BigDecimal queryTotalPaymentAmount(String paymentType,String payerTotal, String type, String status,
                                       String country, String city, String startTime, String endTime, String payer
    );

    List<Map<String, String>> getCities();

    List<Map<String, String>> getCountries();

    int insertIgnore(@Param("paymentInfo")PaymentInfo paymentInfo);

    List<PaymentInfo> selectPaidPaymentsByAccountAndPromotion(Long accountId, String promotionCode);
}
