package com.ga.core.mapper.settle;

import com.ga.core.vo.settle.ChargebackVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface ChargebackMapper {
    int insert(ChargebackVO vo);
    int insertBatch(@Param("list") List<ChargebackVO> list);
    List<ChargebackVO> selectByAgent(@Param("agentId") Long agentId,
                                     @Param("settleMonth") String settleMonth);
    int updatePaid(@Param("cbId") Long cbId,
                   @Param("paidAmount") BigDecimal paidAmount,
                   @Param("status") String status);

    List<Map<String, Object>> aggregateByAgent(@Param("settleMonth") String settleMonth);
    BigDecimal sumByMonth(@Param("settleMonth") String settleMonth);
}
