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_platform, gas_price_gun, ",
        "gas_price_vip, gas_price_official, ",
        "gas_price_cost, gas_price_cost_total, ",
        "gas_price_channel_pay, gas_oil_liters, ",
        "gas_discount, gas_oil_subsidy, ",
        "gas_liters_preferences, gas_price_preferences, ",
        "gas_class_group_id, gas_class_group_name, ",
        "gas_class_group_task_id, gas_staff_id, ",
        "gas_staff_name, gas_salesman_id, ",
        "gas_salesman_name, gas_agent_id, ",
        "gas_agent_name, gas_org_id, ",
        "gas_org_name, 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}, ",
        "#{gasPricePlatform,jdbcType=DECIMAL}, #{gasPriceGun,jdbcType=DECIMAL}, ",
        "#{gasPriceVip,jdbcType=DECIMAL}, #{gasPriceOfficial,jdbcType=DECIMAL}, ",
        "#{gasPriceCost,jdbcType=DECIMAL}, #{gasPriceCostTotal,jdbcType=DECIMAL}, ",
        "#{gasPriceChannelPay,jdbcType=DECIMAL}, #{gasOilLiters,jdbcType=DECIMAL}, ",
        "#{gasDiscount,jdbcType=DECIMAL}, #{gasOilSubsidy,jdbcType=DECIMAL}, ",
        "#{gasLitersPreferences,jdbcType=DECIMAL}, #{gasPricePreferences,jdbcType=DECIMAL}, ",
        "#{gasClassGroupId,jdbcType=BIGINT}, #{gasClassGroupName,jdbcType=VARCHAR}, ",
        "#{gasClassGroupTaskId,jdbcType=BIGINT}, #{gasStaffId,jdbcType=BIGINT}, ",
        "#{gasStaffName,jdbcType=VARCHAR}, #{gasSalesmanId,jdbcType=BIGINT}, ",
        "#{gasSalesmanName,jdbcType=VARCHAR}, #{gasAgentId,jdbcType=BIGINT}, ",
        "#{gasAgentName,jdbcType=VARCHAR}, #{gasOrgId,jdbcType=BIGINT}, ",
        "#{gasOrgName,jdbcType=VARCHAR}, #{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_platform", property="gasPricePlatform", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_cost", property="gasPriceCost", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_cost_total", property="gasPriceCostTotal", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_channel_pay", property="gasPriceChannelPay", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_class_group_task_id", property="gasClassGroupTaskId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_salesman_name", property="gasSalesmanName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_agent_id", property="gasAgentId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_agent_name", property="gasAgentName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_org_id", property="gasOrgId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_org_name", property="gasOrgName", jdbcType=JdbcType.VARCHAR),
        @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_platform, gas_price_gun, gas_price_vip, ",
        "gas_price_official, gas_price_cost, gas_price_cost_total, gas_price_channel_pay, ",
        "gas_oil_liters, gas_discount, gas_oil_subsidy, gas_liters_preferences, gas_price_preferences, ",
        "gas_class_group_id, gas_class_group_name, gas_class_group_task_id, gas_staff_id, ",
        "gas_staff_name, gas_salesman_id, gas_salesman_name, gas_agent_id, gas_agent_name, ",
        "gas_org_id, gas_org_name, 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_platform", property="gasPricePlatform", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_cost", property="gasPriceCost", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_cost_total", property="gasPriceCostTotal", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_channel_pay", property="gasPriceChannelPay", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL),
        @Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_class_group_task_id", property="gasClassGroupTaskId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_salesman_name", property="gasSalesmanName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_agent_id", property="gasAgentId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_agent_name", property="gasAgentName", jdbcType=JdbcType.VARCHAR),
        @Result(column="gas_org_id", property="gasOrgId", jdbcType=JdbcType.BIGINT),
        @Result(column="gas_org_name", property="gasOrgName", jdbcType=JdbcType.VARCHAR),
        @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_platform = #{gasPricePlatform,jdbcType=DECIMAL},",
          "gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},",
          "gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},",
          "gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL},",
          "gas_price_cost = #{gasPriceCost,jdbcType=DECIMAL},",
          "gas_price_cost_total = #{gasPriceCostTotal,jdbcType=DECIMAL},",
          "gas_price_channel_pay = #{gasPriceChannelPay,jdbcType=DECIMAL},",
          "gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL},",
          "gas_discount = #{gasDiscount,jdbcType=DECIMAL},",
          "gas_oil_subsidy = #{gasOilSubsidy,jdbcType=DECIMAL},",
          "gas_liters_preferences = #{gasLitersPreferences,jdbcType=DECIMAL},",
          "gas_price_preferences = #{gasPricePreferences,jdbcType=DECIMAL},",
          "gas_class_group_id = #{gasClassGroupId,jdbcType=BIGINT},",
          "gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR},",
          "gas_class_group_task_id = #{gasClassGroupTaskId,jdbcType=BIGINT},",
          "gas_staff_id = #{gasStaffId,jdbcType=BIGINT},",
          "gas_staff_name = #{gasStaffName,jdbcType=VARCHAR},",
          "gas_salesman_id = #{gasSalesmanId,jdbcType=BIGINT},",
          "gas_salesman_name = #{gasSalesmanName,jdbcType=VARCHAR},",
          "gas_agent_id = #{gasAgentId,jdbcType=BIGINT},",
          "gas_agent_name = #{gasAgentName,jdbcType=VARCHAR},",
          "gas_org_id = #{gasOrgId,jdbcType=BIGINT},",
          "gas_org_name = #{gasOrgName,jdbcType=VARCHAR},",
          "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);
}