package com.pig4cloud.pig.marketing.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pig4cloud.pig.marketing.api.entity.MarketingData;
import com.pig4cloud.pig.marketing.api.vo.data.PageFirstLevelDataVO;
import com.pig4cloud.pig.marketing.api.vo.data.PageSecondLevelDataVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: lwh
 * @date: 2025-07-22
 * @description: 营销数据统计Mapper
 */
@Mapper
public interface MarketingDataMapper extends BaseMapper<MarketingData> {

	List<PageFirstLevelDataVO> countFirstLevelMarketingData(
			@Param("ip") String ip,
			@Param("appId") String appId,
			@Param("lastHourTime") String lastHourTime,
			@Param("todayStartTime") String todayStartTime,
			@Param("offset") Long offset,
			@Param("pageSize") Long pageSize);


	Long countFirstLevelDataTotal(@Param("ip") String ip, @Param("appId") String appId);


	List<PageSecondLevelDataVO> countSecondLevelMarketingData(
			@Param("ip") String ip,
			@Param("lastHourTime") String lastHourTime,
			@Param("todayStartTime") String todayStartTime,
			@Param("offset") Long offset,
			@Param("pageSize") Long pageSize);

	Long countSecondLevelDataTotal(@Param("ip") String ip);

}
