package com.ruoyi.ai.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.ai.domain.AiStatistics;
import com.ruoyi.ai.domain.MapValue;
import org.apache.ibatis.annotations.Param;

/**
 * ai-统计Mapper接口
 *
 * @author shi
 * @date 2025-11-29
 */
public interface AiStatisticsMapper extends BaseMapper<AiStatistics> {
    int deleteAiStatisticsByDateKeys(String[] dateKeys);

    int deleteAiStatisticsByDateKey(String dateKey);

    void saveOrUpdateData(AiStatistics aiStatistics);

    AiStatistics getTitleTotal();

    List<Long> getTodayHourlyAddUserWithZero(@Param("source") String source);

    List<Long> getWeeklyAddUserCount(@Param("source") String source);

    List<Long> getMonthlyAddUserCount(@Param("source") String source);

    List<Long> getMonthlyAddUserCountByRange(@Param("source") String source, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<String> getAllSource();

    List<Long> getTodayHourlyRechargeWithZero(@Param("source") String source);

    List<Long> getWeeklyRecharge(@Param("source") String source);

    List<Long> getMonthlyRecharge(@Param("source") String source);

    List<Long> getMonthlyRechargeByRange(@Param("source") String source, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<Long> getTodayHourlyVisitorWithZero(@Param("source") String source);

    List<Long> getWeeklyVisitor(@Param("source") String source);

    List<Long> getMonthlyVisitor(@Param("source") String source);

    List<Long> getMonthlyVisitorByRange(@Param("source") String source, @Param("startDate") Date startDate, @Param("endDate") Date endDate);


    List<Long> getTodayHourlyGenerateWithZero(@Param("source") String source);

    List<Long> getWeeklyGenerate(@Param("source") String source);

    List<Long> getMonthlyGenerate(@Param("source") String source);

    List<Long> getMonthlyVisitorGenerate(@Param("source") String source, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<MapValue> getMapStatistics();
}
