<?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.platform.dao.VendorInfoMapper">
  <resultMap id="BaseResultMap" type="com.platform.pojo.VendorInfo">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="VENDOR_CODE" jdbcType="VARCHAR" property="vendorCode" />
    <result column="VENDOR_NAME" jdbcType="VARCHAR" property="vendorName" />
    <result column="LICENSE_CODE" jdbcType="VARCHAR" property="licenseCode" />
    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
    <result column="ADD_USER_ID" jdbcType="VARCHAR" property="addUserId" />
    <result column="ADD_USER_NAME" jdbcType="VARCHAR" property="addUserName" />
    <result column="ADD_DATETIME" jdbcType="TIMESTAMP" property="addDatetime" />
    <result column="EDIT_USER_ID" jdbcType="VARCHAR" property="editUserId" />
    <result column="EDIT_USER_NAME" jdbcType="VARCHAR" property="editUserName" />
    <result column="EDIT_DATETIME" jdbcType="TIMESTAMP" property="editDatetime" />
    <result column="DELETE_USER_ID" jdbcType="VARCHAR" property="deleteUserId" />
    <result column="DELETE_USER_NAME" jdbcType="VARCHAR" property="deleteUserName" />
    <result column="DEELTE_DATETIME" jdbcType="TIMESTAMP" property="deelteDatetime" />
    <result column="DELETE_FLAG" jdbcType="DECIMAL" property="deleteFlag" />
    <result column="RETAIN_SHOW_FLAG" jdbcType="VARCHAR" property="retainShowFlag" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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 - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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 - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, VENDOR_CODE, VENDOR_NAME, LICENSE_CODE, REMARK, ADD_USER_ID, ADD_USER_NAME, ADD_DATETIME, 
    EDIT_USER_ID, EDIT_USER_NAME, EDIT_DATETIME, DELETE_USER_ID, DELETE_USER_NAME, DEELTE_DATETIME, 
    DELETE_FLAG, RETAIN_SHOW_FLAG
  </sql>
  <select id="selectByExample" parameterType="com.platform.pojo.VendorInfoExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from VENDOR_INFO
    <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 - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from VENDOR_INFO
    where ID = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from VENDOR_INFO
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.platform.pojo.VendorInfoExample">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from VENDOR_INFO
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.platform.pojo.VendorInfo">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into VENDOR_INFO (ID, VENDOR_CODE, VENDOR_NAME, 
      LICENSE_CODE, REMARK, ADD_USER_ID, 
      ADD_USER_NAME, ADD_DATETIME, EDIT_USER_ID, 
      EDIT_USER_NAME, EDIT_DATETIME, DELETE_USER_ID, 
      DELETE_USER_NAME, DEELTE_DATETIME, DELETE_FLAG, 
      RETAIN_SHOW_FLAG)
    values (#{id,jdbcType=VARCHAR}, #{vendorCode,jdbcType=VARCHAR}, #{vendorName,jdbcType=VARCHAR}, 
      #{licenseCode,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{addUserId,jdbcType=VARCHAR}, 
      #{addUserName,jdbcType=VARCHAR}, #{addDatetime,jdbcType=TIMESTAMP}, #{editUserId,jdbcType=VARCHAR}, 
      #{editUserName,jdbcType=VARCHAR}, #{editDatetime,jdbcType=TIMESTAMP}, #{deleteUserId,jdbcType=VARCHAR}, 
      #{deleteUserName,jdbcType=VARCHAR}, #{deelteDatetime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=DECIMAL}, 
      #{retainShowFlag,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" keyProperty="id" parameterType="com.platform.pojo.VendorInfo" useGeneratedKeys="true">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into VENDOR_INFO
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="vendorCode != null">
        VENDOR_CODE,
      </if>
      <if test="vendorName != null">
        VENDOR_NAME,
      </if>
      <if test="licenseCode != null">
        LICENSE_CODE,
      </if>
      <if test="remark != null">
        REMARK,
      </if>
      <if test="addUserId != null">
        ADD_USER_ID,
      </if>
      <if test="addUserName != null">
        ADD_USER_NAME,
      </if>
      <if test="addDatetime != null">
        ADD_DATETIME,
      </if>
      <if test="editUserId != null">
        EDIT_USER_ID,
      </if>
      <if test="editUserName != null">
        EDIT_USER_NAME,
      </if>
      <if test="editDatetime != null">
        EDIT_DATETIME,
      </if>
      <if test="deleteUserId != null">
        DELETE_USER_ID,
      </if>
      <if test="deleteUserName != null">
        DELETE_USER_NAME,
      </if>
      <if test="deelteDatetime != null">
        DEELTE_DATETIME,
      </if>
      <if test="deleteFlag != null">
        DELETE_FLAG,
      </if>
      <if test="retainShowFlag != null">
        RETAIN_SHOW_FLAG,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="vendorCode != null">
        #{vendorCode,jdbcType=VARCHAR},
      </if>
      <if test="vendorName != null">
        #{vendorName,jdbcType=VARCHAR},
      </if>
      <if test="licenseCode != null">
        #{licenseCode,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="addUserId != null">
        #{addUserId,jdbcType=VARCHAR},
      </if>
      <if test="addUserName != null">
        #{addUserName,jdbcType=VARCHAR},
      </if>
      <if test="addDatetime != null">
        #{addDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="editUserId != null">
        #{editUserId,jdbcType=VARCHAR},
      </if>
      <if test="editUserName != null">
        #{editUserName,jdbcType=VARCHAR},
      </if>
      <if test="editDatetime != null">
        #{editDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteUserId != null">
        #{deleteUserId,jdbcType=VARCHAR},
      </if>
      <if test="deleteUserName != null">
        #{deleteUserName,jdbcType=VARCHAR},
      </if>
      <if test="deelteDatetime != null">
        #{deelteDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteFlag != null">
        #{deleteFlag,jdbcType=DECIMAL},
      </if>
      <if test="retainShowFlag != null">
        #{retainShowFlag,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.platform.pojo.VendorInfoExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from VENDOR_INFO
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update VENDOR_INFO
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.vendorCode != null">
        VENDOR_CODE = #{record.vendorCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vendorName != null">
        VENDOR_NAME = #{record.vendorName,jdbcType=VARCHAR},
      </if>
      <if test="record.licenseCode != null">
        LICENSE_CODE = #{record.licenseCode,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        REMARK = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.addUserId != null">
        ADD_USER_ID = #{record.addUserId,jdbcType=VARCHAR},
      </if>
      <if test="record.addUserName != null">
        ADD_USER_NAME = #{record.addUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.addDatetime != null">
        ADD_DATETIME = #{record.addDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.editUserId != null">
        EDIT_USER_ID = #{record.editUserId,jdbcType=VARCHAR},
      </if>
      <if test="record.editUserName != null">
        EDIT_USER_NAME = #{record.editUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.editDatetime != null">
        EDIT_DATETIME = #{record.editDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.deleteUserId != null">
        DELETE_USER_ID = #{record.deleteUserId,jdbcType=VARCHAR},
      </if>
      <if test="record.deleteUserName != null">
        DELETE_USER_NAME = #{record.deleteUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.deelteDatetime != null">
        DEELTE_DATETIME = #{record.deelteDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.deleteFlag != null">
        DELETE_FLAG = #{record.deleteFlag,jdbcType=DECIMAL},
      </if>
      <if test="record.retainShowFlag != null">
        RETAIN_SHOW_FLAG = #{record.retainShowFlag,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update VENDOR_INFO
    set ID = #{record.id,jdbcType=VARCHAR},
      VENDOR_CODE = #{record.vendorCode,jdbcType=VARCHAR},
      VENDOR_NAME = #{record.vendorName,jdbcType=VARCHAR},
      LICENSE_CODE = #{record.licenseCode,jdbcType=VARCHAR},
      REMARK = #{record.remark,jdbcType=VARCHAR},
      ADD_USER_ID = #{record.addUserId,jdbcType=VARCHAR},
      ADD_USER_NAME = #{record.addUserName,jdbcType=VARCHAR},
      ADD_DATETIME = #{record.addDatetime,jdbcType=TIMESTAMP},
      EDIT_USER_ID = #{record.editUserId,jdbcType=VARCHAR},
      EDIT_USER_NAME = #{record.editUserName,jdbcType=VARCHAR},
      EDIT_DATETIME = #{record.editDatetime,jdbcType=TIMESTAMP},
      DELETE_USER_ID = #{record.deleteUserId,jdbcType=VARCHAR},
      DELETE_USER_NAME = #{record.deleteUserName,jdbcType=VARCHAR},
      DEELTE_DATETIME = #{record.deelteDatetime,jdbcType=TIMESTAMP},
      DELETE_FLAG = #{record.deleteFlag,jdbcType=DECIMAL},
      RETAIN_SHOW_FLAG = #{record.retainShowFlag,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.platform.pojo.VendorInfo">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update VENDOR_INFO
    <set>
      <if test="vendorCode != null">
        VENDOR_CODE = #{vendorCode,jdbcType=VARCHAR},
      </if>
      <if test="vendorName != null">
        VENDOR_NAME = #{vendorName,jdbcType=VARCHAR},
      </if>
      <if test="licenseCode != null">
        LICENSE_CODE = #{licenseCode,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        REMARK = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="addUserId != null">
        ADD_USER_ID = #{addUserId,jdbcType=VARCHAR},
      </if>
      <if test="addUserName != null">
        ADD_USER_NAME = #{addUserName,jdbcType=VARCHAR},
      </if>
      <if test="addDatetime != null">
        ADD_DATETIME = #{addDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="editUserId != null">
        EDIT_USER_ID = #{editUserId,jdbcType=VARCHAR},
      </if>
      <if test="editUserName != null">
        EDIT_USER_NAME = #{editUserName,jdbcType=VARCHAR},
      </if>
      <if test="editDatetime != null">
        EDIT_DATETIME = #{editDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteUserId != null">
        DELETE_USER_ID = #{deleteUserId,jdbcType=VARCHAR},
      </if>
      <if test="deleteUserName != null">
        DELETE_USER_NAME = #{deleteUserName,jdbcType=VARCHAR},
      </if>
      <if test="deelteDatetime != null">
        DEELTE_DATETIME = #{deelteDatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteFlag != null">
        DELETE_FLAG = #{deleteFlag,jdbcType=DECIMAL},
      </if>
      <if test="retainShowFlag != null">
        RETAIN_SHOW_FLAG = #{retainShowFlag,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.platform.pojo.VendorInfo">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update VENDOR_INFO
    set VENDOR_CODE = #{vendorCode,jdbcType=VARCHAR},
      VENDOR_NAME = #{vendorName,jdbcType=VARCHAR},
      LICENSE_CODE = #{licenseCode,jdbcType=VARCHAR},
      REMARK = #{remark,jdbcType=VARCHAR},
      ADD_USER_ID = #{addUserId,jdbcType=VARCHAR},
      ADD_USER_NAME = #{addUserName,jdbcType=VARCHAR},
      ADD_DATETIME = #{addDatetime,jdbcType=TIMESTAMP},
      EDIT_USER_ID = #{editUserId,jdbcType=VARCHAR},
      EDIT_USER_NAME = #{editUserName,jdbcType=VARCHAR},
      EDIT_DATETIME = #{editDatetime,jdbcType=TIMESTAMP},
      DELETE_USER_ID = #{deleteUserId,jdbcType=VARCHAR},
      DELETE_USER_NAME = #{deleteUserName,jdbcType=VARCHAR},
      DEELTE_DATETIME = #{deelteDatetime,jdbcType=TIMESTAMP},
      DELETE_FLAG = #{deleteFlag,jdbcType=DECIMAL},
      RETAIN_SHOW_FLAG = #{retainShowFlag,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
</mapper>