<?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="resources/basecode.CClientLinkmanMapper">
  <resultMap id="BaseResultMap" type="com.ag.dynamicmodule.basecode.pojo.CClientLinkman">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="CLIENT_CODE" jdbcType="VARCHAR" property="clientCode" />
    <result column="TENANCY_ID" jdbcType="VARCHAR" property="tenancyId" />
    <result column="LINK_MAN" jdbcType="VARCHAR" property="linkMan" />
    <result column="DUTY" jdbcType="VARCHAR" property="duty" />
    <result column="SEX" jdbcType="VARCHAR" property="sex" />
    <result column="ADDRESS_TXT" jdbcType="VARCHAR" property="addressTxt" />
    <result column="POSTAL_CODE" jdbcType="VARCHAR" property="postalCode" />
    <result column="TEL" jdbcType="VARCHAR" property="tel" />
    <result column="FAX" jdbcType="VARCHAR" property="fax" />
    <result column="HANDSET" jdbcType="VARCHAR" property="handset" />
    <result column="HOME_PAGE" jdbcType="VARCHAR" property="homePage" />
    <result column="EMAIL" jdbcType="VARCHAR" property="email" />
    <result column="BIRTHDAT" jdbcType="DATE" property="birthdat" />
    <result column="LOVE_TXT" jdbcType="VARCHAR" property="loveTxt" />
    <result column="HOME_ADDR" jdbcType="VARCHAR" property="homeAddr" />
    <result column="RELA_POST" jdbcType="VARCHAR" property="relaPost" />
    <result column="LINK_TEL" jdbcType="VARCHAR" property="linkTel" />
    <result column="LINK_FAX" jdbcType="VARCHAR" property="linkFax" />
    <result column="NOTES" jdbcType="VARCHAR" property="notes" />
    <result column="CREATED_BY" jdbcType="VARCHAR" property="createdBy" />
    <result column="CREATED_ON" jdbcType="TIMESTAMP" property="createdOn" />
    <result column="UPDATED_BY" jdbcType="VARCHAR" property="updatedBy" />
    <result column="UPDATED_ON" jdbcType="TIMESTAMP" property="updatedOn" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, CLIENT_CODE, TENANCY_ID, LINK_MAN, DUTY, SEX, ADDRESS_TXT, POSTAL_CODE, TEL, 
    FAX, HANDSET, HOME_PAGE, EMAIL, BIRTHDAT, LOVE_TXT, HOME_ADDR, RELA_POST, LINK_TEL, 
    LINK_FAX, NOTES, CREATED_BY, CREATED_ON, UPDATED_BY, UPDATED_ON
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from c_client_linkman
    where ID = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from c_client_linkman
    where ID = #{id,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientLinkman">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into c_client_linkman (ID, CLIENT_CODE, TENANCY_ID, 
      LINK_MAN, DUTY, SEX, 
      ADDRESS_TXT, POSTAL_CODE, TEL, 
      FAX, HANDSET, HOME_PAGE, 
      EMAIL, BIRTHDAT, LOVE_TXT, 
      HOME_ADDR, RELA_POST, LINK_TEL, 
      LINK_FAX, NOTES, CREATED_BY, 
      CREATED_ON, UPDATED_BY, UPDATED_ON
      )
    values (#{id,jdbcType=VARCHAR}, #{clientCode,jdbcType=VARCHAR}, #{tenancyId,jdbcType=VARCHAR}, 
      #{linkMan,jdbcType=VARCHAR}, #{duty,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, 
      #{addressTxt,jdbcType=VARCHAR}, #{postalCode,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR}, 
      #{fax,jdbcType=VARCHAR}, #{handset,jdbcType=VARCHAR}, #{homePage,jdbcType=VARCHAR}, 
      #{email,jdbcType=VARCHAR}, #{birthdat,jdbcType=DATE}, #{loveTxt,jdbcType=VARCHAR}, 
      #{homeAddr,jdbcType=VARCHAR}, #{relaPost,jdbcType=VARCHAR}, #{linkTel,jdbcType=VARCHAR}, 
      #{linkFax,jdbcType=VARCHAR}, #{notes,jdbcType=VARCHAR}, #{createdBy,jdbcType=VARCHAR}, 
      #{createdOn,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{updatedOn,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientLinkman">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into c_client_linkman
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="clientCode != null">
        CLIENT_CODE,
      </if>
      <if test="tenancyId != null">
        TENANCY_ID,
      </if>
      <if test="linkMan != null">
        LINK_MAN,
      </if>
      <if test="duty != null">
        DUTY,
      </if>
      <if test="sex != null">
        SEX,
      </if>
      <if test="addressTxt != null">
        ADDRESS_TXT,
      </if>
      <if test="postalCode != null">
        POSTAL_CODE,
      </if>
      <if test="tel != null">
        TEL,
      </if>
      <if test="fax != null">
        FAX,
      </if>
      <if test="handset != null">
        HANDSET,
      </if>
      <if test="homePage != null">
        HOME_PAGE,
      </if>
      <if test="email != null">
        EMAIL,
      </if>
      <if test="birthdat != null">
        BIRTHDAT,
      </if>
      <if test="loveTxt != null">
        LOVE_TXT,
      </if>
      <if test="homeAddr != null">
        HOME_ADDR,
      </if>
      <if test="relaPost != null">
        RELA_POST,
      </if>
      <if test="linkTel != null">
        LINK_TEL,
      </if>
      <if test="linkFax != null">
        LINK_FAX,
      </if>
      <if test="notes != null">
        NOTES,
      </if>
      <if test="createdBy != null">
        CREATED_BY,
      </if>
      <if test="createdOn != null">
        CREATED_ON,
      </if>
      <if test="updatedBy != null">
        UPDATED_BY,
      </if>
      <if test="updatedOn != null">
        UPDATED_ON,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="clientCode != null">
        #{clientCode,jdbcType=VARCHAR},
      </if>
      <if test="tenancyId != null">
        #{tenancyId,jdbcType=VARCHAR},
      </if>
      <if test="linkMan != null">
        #{linkMan,jdbcType=VARCHAR},
      </if>
      <if test="duty != null">
        #{duty,jdbcType=VARCHAR},
      </if>
      <if test="sex != null">
        #{sex,jdbcType=VARCHAR},
      </if>
      <if test="addressTxt != null">
        #{addressTxt,jdbcType=VARCHAR},
      </if>
      <if test="postalCode != null">
        #{postalCode,jdbcType=VARCHAR},
      </if>
      <if test="tel != null">
        #{tel,jdbcType=VARCHAR},
      </if>
      <if test="fax != null">
        #{fax,jdbcType=VARCHAR},
      </if>
      <if test="handset != null">
        #{handset,jdbcType=VARCHAR},
      </if>
      <if test="homePage != null">
        #{homePage,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        #{email,jdbcType=VARCHAR},
      </if>
      <if test="birthdat != null">
        #{birthdat,jdbcType=DATE},
      </if>
      <if test="loveTxt != null">
        #{loveTxt,jdbcType=VARCHAR},
      </if>
      <if test="homeAddr != null">
        #{homeAddr,jdbcType=VARCHAR},
      </if>
      <if test="relaPost != null">
        #{relaPost,jdbcType=VARCHAR},
      </if>
      <if test="linkTel != null">
        #{linkTel,jdbcType=VARCHAR},
      </if>
      <if test="linkFax != null">
        #{linkFax,jdbcType=VARCHAR},
      </if>
      <if test="notes != null">
        #{notes,jdbcType=VARCHAR},
      </if>
      <if test="createdBy != null">
        #{createdBy,jdbcType=VARCHAR},
      </if>
      <if test="createdOn != null">
        #{createdOn,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedBy != null">
        #{updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedOn != null">
        #{updatedOn,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientLinkman">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update c_client_linkman
    <set>
      <if test="clientCode != null">
        CLIENT_CODE = #{clientCode,jdbcType=VARCHAR},
      </if>
      <if test="tenancyId != null">
        TENANCY_ID = #{tenancyId,jdbcType=VARCHAR},
      </if>
      <if test="linkMan != null">
        LINK_MAN = #{linkMan,jdbcType=VARCHAR},
      </if>
      <if test="duty != null">
        DUTY = #{duty,jdbcType=VARCHAR},
      </if>
      <if test="sex != null">
        SEX = #{sex,jdbcType=VARCHAR},
      </if>
      <if test="addressTxt != null">
        ADDRESS_TXT = #{addressTxt,jdbcType=VARCHAR},
      </if>
      <if test="postalCode != null">
        POSTAL_CODE = #{postalCode,jdbcType=VARCHAR},
      </if>
      <if test="tel != null">
        TEL = #{tel,jdbcType=VARCHAR},
      </if>
      <if test="fax != null">
        FAX = #{fax,jdbcType=VARCHAR},
      </if>
      <if test="handset != null">
        HANDSET = #{handset,jdbcType=VARCHAR},
      </if>
      <if test="homePage != null">
        HOME_PAGE = #{homePage,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        EMAIL = #{email,jdbcType=VARCHAR},
      </if>
      <if test="birthdat != null">
        BIRTHDAT = #{birthdat,jdbcType=DATE},
      </if>
      <if test="loveTxt != null">
        LOVE_TXT = #{loveTxt,jdbcType=VARCHAR},
      </if>
      <if test="homeAddr != null">
        HOME_ADDR = #{homeAddr,jdbcType=VARCHAR},
      </if>
      <if test="relaPost != null">
        RELA_POST = #{relaPost,jdbcType=VARCHAR},
      </if>
      <if test="linkTel != null">
        LINK_TEL = #{linkTel,jdbcType=VARCHAR},
      </if>
      <if test="linkFax != null">
        LINK_FAX = #{linkFax,jdbcType=VARCHAR},
      </if>
      <if test="notes != null">
        NOTES = #{notes,jdbcType=VARCHAR},
      </if>
      <if test="createdBy != null">
        CREATED_BY = #{createdBy,jdbcType=VARCHAR},
      </if>
      <if test="createdOn != null">
        CREATED_ON = #{createdOn,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedBy != null">
        UPDATED_BY = #{updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedOn != null">
        UPDATED_ON = #{updatedOn,jdbcType=TIMESTAMP},
      </if>
    </set>
    where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ag.dynamicmodule.basecode.pojo.CClientLinkman">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update c_client_linkman
    set CLIENT_CODE = #{clientCode,jdbcType=VARCHAR},
      TENANCY_ID = #{tenancyId,jdbcType=VARCHAR},
      LINK_MAN = #{linkMan,jdbcType=VARCHAR},
      DUTY = #{duty,jdbcType=VARCHAR},
      SEX = #{sex,jdbcType=VARCHAR},
      ADDRESS_TXT = #{addressTxt,jdbcType=VARCHAR},
      POSTAL_CODE = #{postalCode,jdbcType=VARCHAR},
      TEL = #{tel,jdbcType=VARCHAR},
      FAX = #{fax,jdbcType=VARCHAR},
      HANDSET = #{handset,jdbcType=VARCHAR},
      HOME_PAGE = #{homePage,jdbcType=VARCHAR},
      EMAIL = #{email,jdbcType=VARCHAR},
      BIRTHDAT = #{birthdat,jdbcType=DATE},
      LOVE_TXT = #{loveTxt,jdbcType=VARCHAR},
      HOME_ADDR = #{homeAddr,jdbcType=VARCHAR},
      RELA_POST = #{relaPost,jdbcType=VARCHAR},
      LINK_TEL = #{linkTel,jdbcType=VARCHAR},
      LINK_FAX = #{linkFax,jdbcType=VARCHAR},
      NOTES = #{notes,jdbcType=VARCHAR},
      CREATED_BY = #{createdBy,jdbcType=VARCHAR},
      CREATED_ON = #{createdOn,jdbcType=TIMESTAMP},
      UPDATED_BY = #{updatedBy,jdbcType=VARCHAR},
      UPDATED_ON = #{updatedOn,jdbcType=TIMESTAMP}
    where ID = #{id,jdbcType=VARCHAR}
  </update>
</mapper>