package com.hai.dao;

import com.hai.entity.HighOrderRefund;
import com.hai.entity.HighOrderRefundExample;
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 HighOrderRefundMapper extends HighOrderRefundMapperExt {
    @SelectProvider(type=HighOrderRefundSqlProvider.class, method="countByExample")
    long countByExample(HighOrderRefundExample example);

    @DeleteProvider(type=HighOrderRefundSqlProvider.class, method="deleteByExample")
    int deleteByExample(HighOrderRefundExample example);

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

    @Insert({
        "insert into high_order_refund (order_id, order_no, ",
        "order_child_id, order_child_no, ",
        "mem_id, mem_name, mem_phone, ",
        "goods_type, goods_id, ",
        "goods_name, goods_desc, ",
        "goods_img, goods_spec_name, ",
        "goods_count, pay_type, ",
        "account_merchant_num, refund_order_no, ",
        "third_party_refund_order_no, return_total_price, ",
        "refund_goods_num, refund_price, ",
        "refund_integral, refund_remark, ",
        "refund_status, refund_fail_reason, ",
        "create_time, refund_time, ",
        "update_time, op_user_type, ",
        "op_user_id, op_user_name, ",
        "ext_1, ext_2, ext_3, ",
        "ext_4, ext_5, ext_6)",
        "values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
        "#{orderChildId,jdbcType=BIGINT}, #{orderChildNo,jdbcType=VARCHAR}, ",
        "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
        "#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ",
        "#{goodsName,jdbcType=VARCHAR}, #{goodsDesc,jdbcType=VARCHAR}, ",
        "#{goodsImg,jdbcType=VARCHAR}, #{goodsSpecName,jdbcType=VARCHAR}, ",
        "#{goodsCount,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER}, ",
        "#{accountMerchantNum,jdbcType=VARCHAR}, #{refundOrderNo,jdbcType=VARCHAR}, ",
        "#{thirdPartyRefundOrderNo,jdbcType=VARCHAR}, #{returnTotalPrice,jdbcType=DECIMAL}, ",
        "#{refundGoodsNum,jdbcType=INTEGER}, #{refundPrice,jdbcType=DECIMAL}, ",
        "#{refundIntegral,jdbcType=INTEGER}, #{refundRemark,jdbcType=VARCHAR}, ",
        "#{refundStatus,jdbcType=INTEGER}, #{refundFailReason,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{opUserType,jdbcType=INTEGER}, ",
        "#{opUserId,jdbcType=BIGINT}, #{opUserName,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(HighOrderRefund record);

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

    @SelectProvider(type=HighOrderRefundSqlProvider.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="order_child_id", property="orderChildId", jdbcType=JdbcType.BIGINT),
        @Result(column="order_child_no", property="orderChildNo", 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="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_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
        @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
        @Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
        @Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="third_party_refund_order_no", property="thirdPartyRefundOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="return_total_price", property="returnTotalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="refund_goods_num", property="refundGoodsNum", jdbcType=JdbcType.INTEGER),
        @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.INTEGER),
        @Result(column="refund_remark", property="refundRemark", jdbcType=JdbcType.VARCHAR),
        @Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="op_user_type", property="opUserType", jdbcType=JdbcType.INTEGER),
        @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT),
        @Result(column="op_user_name", property="opUserName", 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<HighOrderRefund> selectByExample(HighOrderRefundExample example);

    @Select({
        "select",
        "id, order_id, order_no, order_child_id, order_child_no, mem_id, mem_name, mem_phone, ",
        "goods_type, goods_id, goods_name, goods_desc, goods_img, goods_spec_name, goods_count, ",
        "pay_type, account_merchant_num, refund_order_no, third_party_refund_order_no, ",
        "return_total_price, refund_goods_num, refund_price, refund_integral, refund_remark, ",
        "refund_status, refund_fail_reason, create_time, refund_time, update_time, op_user_type, ",
        "op_user_id, op_user_name, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
        "from high_order_refund",
        "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="order_child_id", property="orderChildId", jdbcType=JdbcType.BIGINT),
        @Result(column="order_child_no", property="orderChildNo", 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="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_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
        @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
        @Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
        @Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="third_party_refund_order_no", property="thirdPartyRefundOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="return_total_price", property="returnTotalPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="refund_goods_num", property="refundGoodsNum", jdbcType=JdbcType.INTEGER),
        @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
        @Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.INTEGER),
        @Result(column="refund_remark", property="refundRemark", jdbcType=JdbcType.VARCHAR),
        @Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="op_user_type", property="opUserType", jdbcType=JdbcType.INTEGER),
        @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT),
        @Result(column="op_user_name", property="opUserName", 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)
    })
    HighOrderRefund selectByPrimaryKey(Long id);

    @UpdateProvider(type=HighOrderRefundSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") HighOrderRefund record, @Param("example") HighOrderRefundExample example);

    @UpdateProvider(type=HighOrderRefundSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") HighOrderRefund record, @Param("example") HighOrderRefundExample example);

    @UpdateProvider(type=HighOrderRefundSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(HighOrderRefund record);

    @Update({
        "update high_order_refund",
        "set order_id = #{orderId,jdbcType=BIGINT},",
          "order_no = #{orderNo,jdbcType=VARCHAR},",
          "order_child_id = #{orderChildId,jdbcType=BIGINT},",
          "order_child_no = #{orderChildNo,jdbcType=VARCHAR},",
          "mem_id = #{memId,jdbcType=BIGINT},",
          "mem_name = #{memName,jdbcType=VARCHAR},",
          "mem_phone = #{memPhone,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_count = #{goodsCount,jdbcType=INTEGER},",
          "pay_type = #{payType,jdbcType=INTEGER},",
          "account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR},",
          "refund_order_no = #{refundOrderNo,jdbcType=VARCHAR},",
          "third_party_refund_order_no = #{thirdPartyRefundOrderNo,jdbcType=VARCHAR},",
          "return_total_price = #{returnTotalPrice,jdbcType=DECIMAL},",
          "refund_goods_num = #{refundGoodsNum,jdbcType=INTEGER},",
          "refund_price = #{refundPrice,jdbcType=DECIMAL},",
          "refund_integral = #{refundIntegral,jdbcType=INTEGER},",
          "refund_remark = #{refundRemark,jdbcType=VARCHAR},",
          "refund_status = #{refundStatus,jdbcType=INTEGER},",
          "refund_fail_reason = #{refundFailReason,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "refund_time = #{refundTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "op_user_type = #{opUserType,jdbcType=INTEGER},",
          "op_user_id = #{opUserId,jdbcType=BIGINT},",
          "op_user_name = #{opUserName,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(HighOrderRefund record);
}