package com.jeesharp.business.modules.coupon.stats.service;

import com.jeesharp.business.modules.coupon.stats.vo.CouponStatsDateCountVO;
import com.jeesharp.business.modules.coupon.stats.vo.CouponStatsTemplateRankRowVO;
import com.jeesharp.business.modules.coupon.stats.vo.CouponStatsTenantScope;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 优惠券统计领域服务，封装租户内聚合查询。
 *
 * @author jeesharp
 * @since 2026-07-03
 */
public interface CouponStatsService {

    long countCouponTemplate(CouponStatsTenantScope scope, Integer status);

    long countMemberCoupon(CouponStatsTenantScope scope, Integer status, String getSource,
                           LocalDateTime startDateTime, LocalDateTime endDateTime);

    List<CouponStatsDateCountVO> dailyClaimByGetDate(CouponStatsTenantScope scope,
                                                     LocalDateTime startDateTime,
                                                     LocalDateTime endDateTime);

    List<CouponStatsDateCountVO> dailyGrantByGetDate(CouponStatsTenantScope scope, String getSource,
                                                     LocalDateTime startDateTime,
                                                     LocalDateTime endDateTime);

    List<CouponStatsDateCountVO> dailyUseByUseDate(CouponStatsTenantScope scope,
                                                   LocalDateTime startDateTime,
                                                   LocalDateTime endDateTime);

    List<CouponStatsTemplateRankRowVO> topClaimTemplates(CouponStatsTenantScope scope, int limit);
}
