package com.hai.dao;

import com.hai.entity.HighGasClassGroupTask;
import com.hai.entity.HighGasClassGroupTaskExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;

/**
 * 
 * 代码由工具生成,请勿修改!!!
 * 如果需要扩展请在其父类进行扩展
 * 
 **/
@Repository
public interface HighGasClassGroupTaskMapper extends HighGasClassGroupTaskMapperExt {
    @SelectProvider(type=HighGasClassGroupTaskSqlProvider.class, method="countByExample")
    long countByExample(HighGasClassGroupTaskExample example);

    @DeleteProvider(type=HighGasClassGroupTaskSqlProvider.class, method="deleteByExample")
    int deleteByExample(HighGasClassGroupTaskExample example);

    @Delete({
        "delete from high_gas_class_group_task",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    @Insert({
        "insert into high_gas_class_group_task (gas_class_group_id, gas_class_group_name, ",
        "merchant_store_id, merchant_store_name, ",
        "class_num, start_time, ",
        "end_time, data_count, ",
        "`status`, create_time, ",
        "update_time, ext_1, ",
        "ext_2, ext_3)",
        "values (#{gasClassGroupId,jdbcType=BIGINT}, #{gasClassGroupName,jdbcType=VARCHAR}, ",
        "#{merchantStoreId,jdbcType=BIGINT}, #{merchantStoreName,jdbcType=VARCHAR}, ",
        "#{classNum,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, ",
        "#{endTime,jdbcType=TIMESTAMP}, #{dataCount,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
        "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
    })
    @Options(useGeneratedKeys=true,keyProperty="id")
    int insert(HighGasClassGroupTask record);

    @InsertProvider(type=HighGasClassGroupTaskSqlProvider.class, method="insertSelective")
    @Options(useGeneratedKeys=true,keyProperty="id")
    int insertSelective(HighGasClassGroupTask record);

    @SelectProvider(type=HighGasClassGroupTaskSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
        @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT),
        @Result(column="merchant_store_name", property="merchantStoreName", jdbcType=JdbcType.VARCHAR),
        @Result(column="class_num", property="classNum", jdbcType=JdbcType.INTEGER),
        @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
    })
    List<HighGasClassGroupTask> selectByExample(HighGasClassGroupTaskExample example);

    @Select({
        "select",
        "id, gas_class_group_id, gas_class_group_name, merchant_store_id, merchant_store_name, ",
        "class_num, start_time, end_time, data_count, `status`, create_time, update_time, ",
        "ext_1, ext_2, ext_3",
        "from high_gas_class_group_task",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
        @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT),
        @Result(column="merchant_store_name", property="merchantStoreName", jdbcType=JdbcType.VARCHAR),
        @Result(column="class_num", property="classNum", jdbcType=JdbcType.INTEGER),
        @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
    })
    HighGasClassGroupTask selectByPrimaryKey(Long id);

    @UpdateProvider(type=HighGasClassGroupTaskSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") HighGasClassGroupTask record, @Param("example") HighGasClassGroupTaskExample example);

    @UpdateProvider(type=HighGasClassGroupTaskSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") HighGasClassGroupTask record, @Param("example") HighGasClassGroupTaskExample example);

    @UpdateProvider(type=HighGasClassGroupTaskSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(HighGasClassGroupTask record);

    @Update({
        "update high_gas_class_group_task",
        "set gas_class_group_id = #{gasClassGroupId,jdbcType=BIGINT},",
          "gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR},",
          "merchant_store_id = #{merchantStoreId,jdbcType=BIGINT},",
          "merchant_store_name = #{merchantStoreName,jdbcType=VARCHAR},",
          "class_num = #{classNum,jdbcType=INTEGER},",
          "start_time = #{startTime,jdbcType=TIMESTAMP},",
          "end_time = #{endTime,jdbcType=TIMESTAMP},",
          "data_count = #{dataCount,jdbcType=VARCHAR},",
          "`status` = #{status,jdbcType=INTEGER},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "ext_1 = #{ext1,jdbcType=VARCHAR},",
          "ext_2 = #{ext2,jdbcType=VARCHAR},",
          "ext_3 = #{ext3,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(HighGasClassGroupTask record);
}