package com.ga.core.mapper.report;

import com.ga.core.vo.report.ChargebackRiskRow;
import com.ga.core.vo.report.OrgReportRow;
import com.ga.core.vo.report.PerfReportRow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.cursor.Cursor;

import java.util.List;

/**
 * 리포트 Mapper — 기존 정산 데이터 위 읽기전용 집계 (신규 테이블 없음).
 * 실적/조직별 = settle_master 집계, 환수위험 = recruit_ledger + chargeback_grade.
 * 각 select 는 조회용(List)과 엑셀 export 용(Cursor) 두 변형을 제공.
 */
@Mapper
public interface ReportMapper {

    List<PerfReportRow> selectPerformance(@Param("year") String year);

    Cursor<PerfReportRow> selectPerformanceCursor(@Param("year") String year);

    List<OrgReportRow> selectOrg(@Param("settleMonth") String settleMonth);

    Cursor<OrgReportRow> selectOrgCursor(@Param("settleMonth") String settleMonth);

    List<ChargebackRiskRow> selectChargebackRisk();

    Cursor<ChargebackRiskRow> selectChargebackRiskCursor();
}
