package com.pcloud.book.applet.mapper;

import com.pcloud.book.applet.dto.AppletBannerStats;
import com.pcloud.book.applet.dto.AppletBannerTrendDTO;
import com.pcloud.book.applet.entity.AppletBannerRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface AppletBannerRecordMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AppletBannerRecord record);

    int insertSelective(AppletBannerRecord record);

    AppletBannerRecord selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AppletBannerRecord record);

    int updateByPrimaryKey(AppletBannerRecord record);

    List<AppletBannerStats> getBannerPVUV(@Param("bannerIds") List<Long> bannerIds);

    List<AppletBannerTrendDTO> getBannerRecordTrendByHour(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("id") Long id);

    List<AppletBannerTrendDTO> getBannerRecordTrendByDay(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("id")Long id);
}