<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.goafanti.common.dao.TOrderExtendMapper">
  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderExtend">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    <id column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="service_status" jdbcType="INTEGER" property="serviceStatus" />
    <result column="service_name" jdbcType="VARCHAR" property="serviceName" />
    <result column="payment_method" jdbcType="INTEGER" property="paymentMethod" />
    <result column="payment_ratio" jdbcType="DECIMAL" property="paymentRatio" />
    <result column="service_amount" jdbcType="DECIMAL" property="serviceAmount" />
    <result column="service_remarks" jdbcType="VARCHAR" property="serviceRemarks" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="payment_status" jdbcType="INTEGER" property="paymentStatus" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    order_no, service_status, service_name, payment_method, payment_ratio, service_amount, 
    service_remarks, create_time, payment_status
  </sql>
  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderExtendExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_order_extend
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    select 
    <include refid="Base_Column_List" />
    from t_order_extend
    where order_no = #{orderNo,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    delete from t_order_extend
    where order_no = #{orderNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderExtendExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    delete from t_order_extend
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.goafanti.common.model.TOrderExtend">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    insert into t_order_extend (order_no, service_status, service_name, 
      payment_method, payment_ratio, service_amount, 
      service_remarks, create_time, payment_status
      )
    values (#{orderNo,jdbcType=VARCHAR}, #{serviceStatus,jdbcType=INTEGER}, #{serviceName,jdbcType=VARCHAR}, 
      #{paymentMethod,jdbcType=INTEGER}, #{paymentRatio,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL}, 
      #{serviceRemarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{paymentStatus,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderExtend">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    insert into t_order_extend
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="serviceStatus != null">
        service_status,
      </if>
      <if test="serviceName != null">
        service_name,
      </if>
      <if test="paymentMethod != null">
        payment_method,
      </if>
      <if test="paymentRatio != null">
        payment_ratio,
      </if>
      <if test="serviceAmount != null">
        service_amount,
      </if>
      <if test="serviceRemarks != null">
        service_remarks,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="paymentStatus != null">
        payment_status,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="orderNo != null">
        #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="serviceStatus != null">
        #{serviceStatus,jdbcType=INTEGER},
      </if>
      <if test="serviceName != null">
        #{serviceName,jdbcType=VARCHAR},
      </if>
      <if test="paymentMethod != null">
        #{paymentMethod,jdbcType=INTEGER},
      </if>
      <if test="paymentRatio != null">
        #{paymentRatio,jdbcType=DECIMAL},
      </if>
      <if test="serviceAmount != null">
        #{serviceAmount,jdbcType=DECIMAL},
      </if>
      <if test="serviceRemarks != null">
        #{serviceRemarks,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="paymentStatus != null">
        #{paymentStatus,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderExtendExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    select count(*) from t_order_extend
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    update t_order_extend
    <set>
      <if test="record.orderNo != null">
        order_no = #{record.orderNo,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceStatus != null">
        service_status = #{record.serviceStatus,jdbcType=INTEGER},
      </if>
      <if test="record.serviceName != null">
        service_name = #{record.serviceName,jdbcType=VARCHAR},
      </if>
      <if test="record.paymentMethod != null">
        payment_method = #{record.paymentMethod,jdbcType=INTEGER},
      </if>
      <if test="record.paymentRatio != null">
        payment_ratio = #{record.paymentRatio,jdbcType=DECIMAL},
      </if>
      <if test="record.serviceAmount != null">
        service_amount = #{record.serviceAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.serviceRemarks != null">
        service_remarks = #{record.serviceRemarks,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.paymentStatus != null">
        payment_status = #{record.paymentStatus,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    update t_order_extend
    set order_no = #{record.orderNo,jdbcType=VARCHAR},
      service_status = #{record.serviceStatus,jdbcType=INTEGER},
      service_name = #{record.serviceName,jdbcType=VARCHAR},
      payment_method = #{record.paymentMethod,jdbcType=INTEGER},
      payment_ratio = #{record.paymentRatio,jdbcType=DECIMAL},
      service_amount = #{record.serviceAmount,jdbcType=DECIMAL},
      service_remarks = #{record.serviceRemarks,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      payment_status = #{record.paymentStatus,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderExtend">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    update t_order_extend
    <set>
      <if test="serviceStatus != null">
        service_status = #{serviceStatus,jdbcType=INTEGER},
      </if>
      <if test="serviceName != null">
        service_name = #{serviceName,jdbcType=VARCHAR},
      </if>
      <if test="paymentMethod != null">
        payment_method = #{paymentMethod,jdbcType=INTEGER},
      </if>
      <if test="paymentRatio != null">
        payment_ratio = #{paymentRatio,jdbcType=DECIMAL},
      </if>
      <if test="serviceAmount != null">
        service_amount = #{serviceAmount,jdbcType=DECIMAL},
      </if>
      <if test="serviceRemarks != null">
        service_remarks = #{serviceRemarks,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="paymentStatus != null">
        payment_status = #{paymentStatus,jdbcType=INTEGER},
      </if>
    </set>
    where order_no = #{orderNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderExtend">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jun 11 14:25:54 CST 2020.
    -->
    update t_order_extend
    set service_status = #{serviceStatus,jdbcType=INTEGER},
      service_name = #{serviceName,jdbcType=VARCHAR},
      payment_method = #{paymentMethod,jdbcType=INTEGER},
      payment_ratio = #{paymentRatio,jdbcType=DECIMAL},
      service_amount = #{serviceAmount,jdbcType=DECIMAL},
      service_remarks = #{serviceRemarks,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      payment_status = #{paymentStatus,jdbcType=INTEGER}
    where order_no = #{orderNo,jdbcType=VARCHAR}
  </update>
</mapper>