package com.bailuntec.mapper;

import com.bailuntec.domain.entity.JobAmazonAdLog;
import com.bailuntec.domain.example.JobAmazonAdLogExample;
import com.dangdang.ddframe.job.api.ShardingContext;
import org.apache.ibatis.annotations.Param;

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

public interface JobAmazonAdLogMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    long countByExample(JobAmazonAdLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int deleteByExample(JobAmazonAdLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int insert(JobAmazonAdLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int insertSelective(JobAmazonAdLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     * @project https://github.com/itfsw/mybatis-generator-plugin
     */
    JobAmazonAdLog selectOneByExample(JobAmazonAdLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    List<JobAmazonAdLog> selectByExample(JobAmazonAdLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    JobAmazonAdLog selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") JobAmazonAdLog record, @Param("example") JobAmazonAdLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") JobAmazonAdLog record, @Param("example") JobAmazonAdLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(JobAmazonAdLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(JobAmazonAdLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     * @project https://github.com/itfsw/mybatis-generator-plugin
     */
    int upsert(JobAmazonAdLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table job_amazon_ad_log
     *
     * @mbg.generated
     * @project https://github.com/itfsw/mybatis-generator-plugin
     */
    int upsertSelective(JobAmazonAdLog record);

    /**
     * <p>
     * 获取还未下载的报告
     * </p>
     *
     * @param shardingContext 分片参数
     * @param localDateTime   获取这个日期前的报告
     * @return 未下载的报告
     */
    List<JobAmazonAdLog> selectUnDownload(@Param("shardingContext") ShardingContext shardingContext, @Param("localDateTime") LocalDateTime localDateTime);
}
