package com.hai.dao;

import com.hai.entity.HighChildOrder;
import com.hai.entity.HighChildOrderExample;
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 HighChildOrderMapper extends HighChildOrderMapperExt {
    @SelectProvider(type=HighChildOrderSqlProvider.class, method="countByExample")
    long countByExample(HighChildOrderExample example);

    @DeleteProvider(type=HighChildOrderSqlProvider.class, method="deleteByExample")
    int deleteByExample(HighChildOrderExample example);

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

    @Insert({
        "insert into high_child_order (order_id, mem_id, ",
        "store_id, store_name, ",
        "store_address, goods_type, ",
        "goods_id, goods_name, ",
        "goods_desc, goods_img, ",
        "goods_spec_name, goods_price, ",
        "goods_actual_price, sale_count, ",
        "total_price, giveaway_type, ",
        "child_orde_status, praise_status, ",
        "gas_oil_no, gas_gun_no, ",
        "gas_oil_type, gas_order_no, ",
        "gas_price_gun, gas_price_vip, ",
        "ext_1, ext_2, ext_3, ",
        "ext_4, ext_5, ext_6)",
        "values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ",
        "#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ",
        "#{storeAddress,jdbcType=VARCHAR}, #{goodsType,jdbcType=INTEGER}, ",
        "#{goodsId,jdbcType=BIGINT}, #{goodsName,jdbcType=VARCHAR}, ",
        "#{goodsDesc,jdbcType=VARCHAR}, #{goodsImg,jdbcType=VARCHAR}, ",
        "#{goodsSpecName,jdbcType=VARCHAR}, #{goodsPrice,jdbcType=DECIMAL}, ",
        "#{goodsActualPrice,jdbcType=DECIMAL}, #{saleCount,jdbcType=INTEGER}, ",
        "#{totalPrice,jdbcType=DECIMAL}, #{giveawayType,jdbcType=BIT}, ",
        "#{childOrdeStatus,jdbcType=INTEGER}, #{praiseStatus,jdbcType=INTEGER}, ",
        "#{gasOilNo,jdbcType=VARCHAR}, #{gasGunNo,jdbcType=VARCHAR}, ",
        "#{gasOilType,jdbcType=INTEGER}, #{gasOrderNo,jdbcType=VARCHAR}, ",
        "#{gasPriceGun,jdbcType=DECIMAL}, #{gasPriceVip,jdbcType=DECIMAL}, ",
        "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
        "#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
    })
    @Options(useGeneratedKeys=true,keyProperty="id")
    int insert(HighChildOrder record);

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

    @SelectProvider(type=HighChildOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
        @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT),
        @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
        @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_address", property="storeAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
        @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
        @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_desc", property="goodsDesc", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_spec_name", property="goodsSpecName", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_price", property="goodsPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="goods_actual_price", property="goodsActualPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
        @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="giveaway_type", property="giveawayType", jdbcType=JdbcType.BIT),
        @Result(column="child_orde_status", property="childOrdeStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="praise_status", property="praiseStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_oil_type", property="gasOilType", jdbcType=JdbcType.INTEGER),
        @Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
        @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),
        @Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
    })
    List<HighChildOrder> selectByExample(HighChildOrderExample example);

    @Select({
        "select",
        "id, order_id, mem_id, store_id, store_name, store_address, goods_type, goods_id, ",
        "goods_name, goods_desc, goods_img, goods_spec_name, goods_price, goods_actual_price, ",
        "sale_count, total_price, giveaway_type, child_orde_status, praise_status, gas_oil_no, ",
        "gas_gun_no, gas_oil_type, gas_order_no, gas_price_gun, gas_price_vip, ext_1, ",
        "ext_2, ext_3, ext_4, ext_5, ext_6",
        "from high_child_order",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
        @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT),
        @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
        @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_address", property="storeAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
        @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
        @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_desc", property="goodsDesc", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_spec_name", property="goodsSpecName", jdbcType=JdbcType.VARCHAR),
        @Result(column="goods_price", property="goodsPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="goods_actual_price", property="goodsActualPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
        @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="giveaway_type", property="giveawayType", jdbcType=JdbcType.BIT),
        @Result(column="child_orde_status", property="childOrdeStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="praise_status", property="praiseStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_oil_type", property="gasOilType", jdbcType=JdbcType.INTEGER),
        @Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
        @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),
        @Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
    })
    HighChildOrder selectByPrimaryKey(Long id);

    @UpdateProvider(type=HighChildOrderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") HighChildOrder record, @Param("example") HighChildOrderExample example);

    @UpdateProvider(type=HighChildOrderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") HighChildOrder record, @Param("example") HighChildOrderExample example);

    @UpdateProvider(type=HighChildOrderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(HighChildOrder record);

    @Update({
        "update high_child_order",
        "set order_id = #{orderId,jdbcType=BIGINT},",
          "mem_id = #{memId,jdbcType=BIGINT},",
          "store_id = #{storeId,jdbcType=BIGINT},",
          "store_name = #{storeName,jdbcType=VARCHAR},",
          "store_address = #{storeAddress,jdbcType=VARCHAR},",
          "goods_type = #{goodsType,jdbcType=INTEGER},",
          "goods_id = #{goodsId,jdbcType=BIGINT},",
          "goods_name = #{goodsName,jdbcType=VARCHAR},",
          "goods_desc = #{goodsDesc,jdbcType=VARCHAR},",
          "goods_img = #{goodsImg,jdbcType=VARCHAR},",
          "goods_spec_name = #{goodsSpecName,jdbcType=VARCHAR},",
          "goods_price = #{goodsPrice,jdbcType=DECIMAL},",
          "goods_actual_price = #{goodsActualPrice,jdbcType=DECIMAL},",
          "sale_count = #{saleCount,jdbcType=INTEGER},",
          "total_price = #{totalPrice,jdbcType=DECIMAL},",
          "giveaway_type = #{giveawayType,jdbcType=BIT},",
          "child_orde_status = #{childOrdeStatus,jdbcType=INTEGER},",
          "praise_status = #{praiseStatus,jdbcType=INTEGER},",
          "gas_oil_no = #{gasOilNo,jdbcType=VARCHAR},",
          "gas_gun_no = #{gasGunNo,jdbcType=VARCHAR},",
          "gas_oil_type = #{gasOilType,jdbcType=INTEGER},",
          "gas_order_no = #{gasOrderNo,jdbcType=VARCHAR},",
          "gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},",
          "gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},",
          "ext_1 = #{ext1,jdbcType=VARCHAR},",
          "ext_2 = #{ext2,jdbcType=VARCHAR},",
          "ext_3 = #{ext3,jdbcType=VARCHAR},",
          "ext_4 = #{ext4,jdbcType=VARCHAR},",
          "ext_5 = #{ext5,jdbcType=VARCHAR},",
          "ext_6 = #{ext6,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(HighChildOrder record);
}