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, order_no, ",
        "mem_id, mem_name, mem_phone, ",
        "child_order_no, store_id, ",
        "store_name, store_address, ",
        "goods_type, goods_id, ",
        "goods_name, goods_desc, ",
        "goods_img, goods_spec_name, ",
        "goods_price, goods_actual_price, ",
        "total_price, total_actual_price, ",
        "sale_count, surplus_refund_num, ",
        "surplus_refund_price, surplus_refund_integral, ",
        "channel_order_no, giveaway_type, ",
        "child_order_status, praise_status, ",
        "create_time, pay_time, ",
        "finish_time, refund_time, ",
        "refund_remarks, cancel_time, ",
        "ext_1, ext_2, ext_3, ",
        "ext_4, ext_5, ext_6)",
        "values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
        "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
        "#{childOrderNo,jdbcType=VARCHAR}, #{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}, ",
        "#{totalPrice,jdbcType=DECIMAL}, #{totalActualPrice,jdbcType=DECIMAL}, ",
        "#{saleCount,jdbcType=INTEGER}, #{surplusRefundNum,jdbcType=INTEGER}, ",
        "#{surplusRefundPrice,jdbcType=DECIMAL}, #{surplusRefundIntegral,jdbcType=INTEGER}, ",
        "#{channelOrderNo,jdbcType=VARCHAR}, #{giveawayType,jdbcType=BIT}, ",
        "#{childOrderStatus,jdbcType=INTEGER}, #{praiseStatus,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ",
        "#{finishTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ",
        "#{refundRemarks,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, ",
        "#{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="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT),
        @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR),
        @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
        @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="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
        @Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER),
        @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="giveaway_type", property="giveawayType", jdbcType=JdbcType.BIT),
        @Result(column="child_order_status", property="childOrderStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="praise_status", property="praiseStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_remarks", property="refundRemarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="cancel_time", property="cancelTime", 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),
        @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, order_no, mem_id, mem_name, mem_phone, child_order_no, store_id, ",
        "store_name, store_address, goods_type, goods_id, goods_name, goods_desc, goods_img, ",
        "goods_spec_name, goods_price, goods_actual_price, total_price, total_actual_price, ",
        "sale_count, surplus_refund_num, surplus_refund_price, surplus_refund_integral, ",
        "channel_order_no, giveaway_type, child_order_status, praise_status, create_time, ",
        "pay_time, finish_time, refund_time, refund_remarks, cancel_time, 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="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT),
        @Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR),
        @Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
        @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="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="total_actual_price", property="totalActualPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="sale_count", property="saleCount", jdbcType=JdbcType.INTEGER),
        @Result(column="surplus_refund_num", property="surplusRefundNum", jdbcType=JdbcType.INTEGER),
        @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="giveaway_type", property="giveawayType", jdbcType=JdbcType.BIT),
        @Result(column="child_order_status", property="childOrderStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="praise_status", property="praiseStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_remarks", property="refundRemarks", jdbcType=JdbcType.VARCHAR),
        @Result(column="cancel_time", property="cancelTime", 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),
        @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},",
          "order_no = #{orderNo,jdbcType=VARCHAR},",
          "mem_id = #{memId,jdbcType=BIGINT},",
          "mem_name = #{memName,jdbcType=VARCHAR},",
          "mem_phone = #{memPhone,jdbcType=VARCHAR},",
          "child_order_no = #{childOrderNo,jdbcType=VARCHAR},",
          "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},",
          "total_price = #{totalPrice,jdbcType=DECIMAL},",
          "total_actual_price = #{totalActualPrice,jdbcType=DECIMAL},",
          "sale_count = #{saleCount,jdbcType=INTEGER},",
          "surplus_refund_num = #{surplusRefundNum,jdbcType=INTEGER},",
          "surplus_refund_price = #{surplusRefundPrice,jdbcType=DECIMAL},",
          "surplus_refund_integral = #{surplusRefundIntegral,jdbcType=INTEGER},",
          "channel_order_no = #{channelOrderNo,jdbcType=VARCHAR},",
          "giveaway_type = #{giveawayType,jdbcType=BIT},",
          "child_order_status = #{childOrderStatus,jdbcType=INTEGER},",
          "praise_status = #{praiseStatus,jdbcType=INTEGER},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "pay_time = #{payTime,jdbcType=TIMESTAMP},",
          "finish_time = #{finishTime,jdbcType=TIMESTAMP},",
          "refund_time = #{refundTime,jdbcType=TIMESTAMP},",
          "refund_remarks = #{refundRemarks,jdbcType=VARCHAR},",
          "cancel_time = #{cancelTime,jdbcType=TIMESTAMP},",
          "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);
}