<?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.OrganizationIdentityMapper">
  <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationIdentity">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="uid" jdbcType="VARCHAR" property="uid" />
    <result column="contacts" jdbcType="VARCHAR" property="contacts" />
    <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
    <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
    <result column="qq" jdbcType="VARCHAR" property="qq" />
    <result column="postal_address" jdbcType="VARCHAR" property="postalAddress" />
    <result column="postcode" jdbcType="VARCHAR" property="postcode" />
    <result column="unit_name" jdbcType="VARCHAR" property="unitName" />
    <result column="registered_capital" jdbcType="DECIMAL" property="registeredCapital" />
    <result column="licence_number" jdbcType="VARCHAR" property="licenceNumber" />
    <result column="licence_province" jdbcType="INTEGER" property="licenceProvince" />
    <result column="licence_city" jdbcType="INTEGER" property="licenceCity" />
    <result column="licence_area" jdbcType="INTEGER" property="licenceArea" />
    <result column="licence_scanning_url" jdbcType="VARCHAR" property="licenceScanningUrl" />
    <result column="org_code" jdbcType="VARCHAR" property="orgCode" />
    <result column="org_code_url" jdbcType="VARCHAR" property="orgCodeUrl" />
    <result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
    <result column="banks" jdbcType="VARCHAR" property="banks" />
    <result column="bank_branch" jdbcType="VARCHAR" property="bankBranch" />
    <result column="bank_card_number" jdbcType="VARCHAR" property="bankCardNumber" />
    <result column="validation_amount" jdbcType="DECIMAL" property="validationAmount" />
    <result column="identity_type" jdbcType="INTEGER" property="identityType" />
    <result column="location_province" jdbcType="INTEGER" property="locationProvince" />
    <result column="location_city" jdbcType="INTEGER" property="locationCity" />
    <result column="location_area" jdbcType="INTEGER" property="locationArea" />
    <result column="legal_person" jdbcType="VARCHAR" property="legalPerson" />
    <result column="legal_person_id_card" jdbcType="VARCHAR" property="legalPersonIdCard" />
    <result column="last_year_tax_report_url" jdbcType="VARCHAR" property="lastYearTaxReportUrl" />
    <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
    <result column="process" jdbcType="INTEGER" property="process" />
    <result column="wrong_count" jdbcType="INTEGER" property="wrongCount" />
    <result column="payment_date" jdbcType="TIMESTAMP" property="paymentDate" />
    <result column="listed" jdbcType="INTEGER" property="listed" />
    <result column="listed_date" jdbcType="TIMESTAMP" property="listedDate" />
    <result column="listed_type" jdbcType="INTEGER" property="listedType" />
    <result column="stock_code" jdbcType="VARCHAR" property="stockCode" />
    <result column="certificate_number" jdbcType="VARCHAR" property="certificateNumber" />
    <result column="issuing_date" jdbcType="TIMESTAMP" property="issuingDate" />
    <result column="cog_contacts" jdbcType="INTEGER" property="cogContacts" />
    <result column="tech_principal" jdbcType="VARCHAR" property="techPrincipal" />
    <result column="contacts_fixed_tel" jdbcType="VARCHAR" property="contactsFixedTel" />
    <result column="contacts_fax" jdbcType="VARCHAR" property="contactsFax" />
    <result column="legal_person_tel" jdbcType="VARCHAR" property="legalPersonTel" />
    <result column="legal_person_fax" jdbcType="VARCHAR" property="legalPersonFax" />
    <result column="legal_person_email" jdbcType="VARCHAR" property="legalPersonEmail" />
    <result column="registration_time" jdbcType="TIMESTAMP" property="registrationTime" />
    <result column="ratepay_code" jdbcType="VARCHAR" property="ratepayCode" />
    <result column="industry" jdbcType="INTEGER" property="industry" />
    <result column="enterprise_scale" jdbcType="VARCHAR" property="enterpriseScale" />
    <result column="register_type" jdbcType="VARCHAR" property="registerType" />
    <result column="foreign_investment" jdbcType="VARCHAR" property="foreignInvestment" />
    <result column="field" jdbcType="VARCHAR" property="field" />
    <result column="tax_authority" jdbcType="INTEGER" property="taxAuthority" />
    <result column="ratepay_method" jdbcType="INTEGER" property="ratepayMethod" />
    <result column="high_tech_zone" jdbcType="INTEGER" property="highTechZone" />
    <result column="risk_investment" jdbcType="INTEGER" property="riskInvestment" />
    <result column="business_scope" jdbcType="VARCHAR" property="businessScope" />
    <result column="high_tech_name" jdbcType="VARCHAR" property="highTechName" />
    <result column="patent_prory_statement_url" jdbcType="VARCHAR" property="patentProryStatementUrl" />
    <result column="international" jdbcType="INTEGER" property="international" />
    <result column="review_instructions" jdbcType="VARCHAR" property="reviewInstructions" />
    <result column="investment" jdbcType="INTEGER" property="investment" />
    <result column="year_sales_amount" jdbcType="DECIMAL" property="yearSalesAmount" />
    <result column="last_year_research_amount" jdbcType="DECIMAL" property="lastYearResearchAmount" />
    <result column="assets" jdbcType="DECIMAL" property="assets" />
    <result column="qualification" jdbcType="VARCHAR" property="qualification" />
    <result column="cooperation_situation" jdbcType="VARCHAR" property="cooperationSituation" />
  </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 Wed Jun 06 10:26:09 CST 2018.
    -->
    <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 Wed Jun 06 10:26:09 CST 2018.
    -->
    <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 Wed Jun 06 10:26:09 CST 2018.
    -->
    id, uid, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, unit_name, 
    registered_capital, licence_number, licence_province, licence_city, licence_area, 
    licence_scanning_url, org_code, org_code_url, bank_account, banks, bank_branch, bank_card_number, 
    validation_amount, identity_type, location_province, location_city, location_area, 
    legal_person, legal_person_id_card, last_year_tax_report_url, audit_status, process, 
    wrong_count, payment_date, listed, listed_date, listed_type, stock_code, certificate_number, 
    issuing_date, cog_contacts, tech_principal, contacts_fixed_tel, contacts_fax, legal_person_tel, 
    legal_person_fax, legal_person_email, registration_time, ratepay_code, industry, 
    enterprise_scale, register_type, foreign_investment, field, tax_authority, ratepay_method, 
    high_tech_zone, risk_investment, business_scope, high_tech_name, patent_prory_statement_url, 
    international, review_instructions, investment, year_sales_amount, last_year_research_amount, 
    assets, qualification, cooperation_situation
  </sql>
  <select id="selectByExample" parameterType="com.goafanti.common.model.OrganizationIdentityExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from organization_identity
    <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 Wed Jun 06 10:26:09 CST 2018.
    -->
    select 
    <include refid="Base_Column_List" />
    from organization_identity
    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.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    delete from organization_identity
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.goafanti.common.model.OrganizationIdentityExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    delete from organization_identity
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    insert into organization_identity (id, uid, contacts, 
      contact_mobile, fixed_tel, qq, 
      postal_address, postcode, unit_name, 
      registered_capital, licence_number, licence_province, 
      licence_city, licence_area, licence_scanning_url, 
      org_code, org_code_url, bank_account, 
      banks, bank_branch, bank_card_number, 
      validation_amount, identity_type, location_province, 
      location_city, location_area, legal_person, 
      legal_person_id_card, last_year_tax_report_url, 
      audit_status, process, wrong_count, 
      payment_date, listed, listed_date, 
      listed_type, stock_code, certificate_number, 
      issuing_date, cog_contacts, tech_principal, 
      contacts_fixed_tel, contacts_fax, legal_person_tel, 
      legal_person_fax, legal_person_email, registration_time, 
      ratepay_code, industry, enterprise_scale, 
      register_type, foreign_investment, field, 
      tax_authority, ratepay_method, high_tech_zone, 
      risk_investment, business_scope, high_tech_name, 
      patent_prory_statement_url, international, 
      review_instructions, investment, year_sales_amount, 
      last_year_research_amount, assets, qualification, 
      cooperation_situation)
    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, 
      #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR}, 
      #{postalAddress,jdbcType=VARCHAR}, #{postcode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR}, 
      #{registeredCapital,jdbcType=DECIMAL}, #{licenceNumber,jdbcType=VARCHAR}, #{licenceProvince,jdbcType=INTEGER}, 
      #{licenceCity,jdbcType=INTEGER}, #{licenceArea,jdbcType=INTEGER}, #{licenceScanningUrl,jdbcType=VARCHAR}, 
      #{orgCode,jdbcType=VARCHAR}, #{orgCodeUrl,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, 
      #{banks,jdbcType=VARCHAR}, #{bankBranch,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, 
      #{validationAmount,jdbcType=DECIMAL}, #{identityType,jdbcType=INTEGER}, #{locationProvince,jdbcType=INTEGER}, 
      #{locationCity,jdbcType=INTEGER}, #{locationArea,jdbcType=INTEGER}, #{legalPerson,jdbcType=VARCHAR}, 
      #{legalPersonIdCard,jdbcType=VARCHAR}, #{lastYearTaxReportUrl,jdbcType=VARCHAR}, 
      #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, 
      #{paymentDate,jdbcType=TIMESTAMP}, #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP}, 
      #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR}, #{certificateNumber,jdbcType=VARCHAR}, 
      #{issuingDate,jdbcType=TIMESTAMP}, #{cogContacts,jdbcType=INTEGER}, #{techPrincipal,jdbcType=VARCHAR}, 
      #{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, 
      #{legalPersonFax,jdbcType=VARCHAR}, #{legalPersonEmail,jdbcType=VARCHAR}, #{registrationTime,jdbcType=TIMESTAMP}, 
      #{ratepayCode,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER}, #{enterpriseScale,jdbcType=VARCHAR}, 
      #{registerType,jdbcType=VARCHAR}, #{foreignInvestment,jdbcType=VARCHAR}, #{field,jdbcType=VARCHAR}, 
      #{taxAuthority,jdbcType=INTEGER}, #{ratepayMethod,jdbcType=INTEGER}, #{highTechZone,jdbcType=INTEGER}, 
      #{riskInvestment,jdbcType=INTEGER}, #{businessScope,jdbcType=VARCHAR}, #{highTechName,jdbcType=VARCHAR}, 
      #{patentProryStatementUrl,jdbcType=VARCHAR}, #{international,jdbcType=INTEGER}, 
      #{reviewInstructions,jdbcType=VARCHAR}, #{investment,jdbcType=INTEGER}, #{yearSalesAmount,jdbcType=DECIMAL}, 
      #{lastYearResearchAmount,jdbcType=DECIMAL}, #{assets,jdbcType=DECIMAL}, #{qualification,jdbcType=VARCHAR}, 
      #{cooperationSituation,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    insert into organization_identity
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="uid != null">
        uid,
      </if>
      <if test="contacts != null">
        contacts,
      </if>
      <if test="contactMobile != null">
        contact_mobile,
      </if>
      <if test="fixedTel != null">
        fixed_tel,
      </if>
      <if test="qq != null">
        qq,
      </if>
      <if test="postalAddress != null">
        postal_address,
      </if>
      <if test="postcode != null">
        postcode,
      </if>
      <if test="unitName != null">
        unit_name,
      </if>
      <if test="registeredCapital != null">
        registered_capital,
      </if>
      <if test="licenceNumber != null">
        licence_number,
      </if>
      <if test="licenceProvince != null">
        licence_province,
      </if>
      <if test="licenceCity != null">
        licence_city,
      </if>
      <if test="licenceArea != null">
        licence_area,
      </if>
      <if test="licenceScanningUrl != null">
        licence_scanning_url,
      </if>
      <if test="orgCode != null">
        org_code,
      </if>
      <if test="orgCodeUrl != null">
        org_code_url,
      </if>
      <if test="bankAccount != null">
        bank_account,
      </if>
      <if test="banks != null">
        banks,
      </if>
      <if test="bankBranch != null">
        bank_branch,
      </if>
      <if test="bankCardNumber != null">
        bank_card_number,
      </if>
      <if test="validationAmount != null">
        validation_amount,
      </if>
      <if test="identityType != null">
        identity_type,
      </if>
      <if test="locationProvince != null">
        location_province,
      </if>
      <if test="locationCity != null">
        location_city,
      </if>
      <if test="locationArea != null">
        location_area,
      </if>
      <if test="legalPerson != null">
        legal_person,
      </if>
      <if test="legalPersonIdCard != null">
        legal_person_id_card,
      </if>
      <if test="lastYearTaxReportUrl != null">
        last_year_tax_report_url,
      </if>
      <if test="auditStatus != null">
        audit_status,
      </if>
      <if test="process != null">
        process,
      </if>
      <if test="wrongCount != null">
        wrong_count,
      </if>
      <if test="paymentDate != null">
        payment_date,
      </if>
      <if test="listed != null">
        listed,
      </if>
      <if test="listedDate != null">
        listed_date,
      </if>
      <if test="listedType != null">
        listed_type,
      </if>
      <if test="stockCode != null">
        stock_code,
      </if>
      <if test="certificateNumber != null">
        certificate_number,
      </if>
      <if test="issuingDate != null">
        issuing_date,
      </if>
      <if test="cogContacts != null">
        cog_contacts,
      </if>
      <if test="techPrincipal != null">
        tech_principal,
      </if>
      <if test="contactsFixedTel != null">
        contacts_fixed_tel,
      </if>
      <if test="contactsFax != null">
        contacts_fax,
      </if>
      <if test="legalPersonTel != null">
        legal_person_tel,
      </if>
      <if test="legalPersonFax != null">
        legal_person_fax,
      </if>
      <if test="legalPersonEmail != null">
        legal_person_email,
      </if>
      <if test="registrationTime != null">
        registration_time,
      </if>
      <if test="ratepayCode != null">
        ratepay_code,
      </if>
      <if test="industry != null">
        industry,
      </if>
      <if test="enterpriseScale != null">
        enterprise_scale,
      </if>
      <if test="registerType != null">
        register_type,
      </if>
      <if test="foreignInvestment != null">
        foreign_investment,
      </if>
      <if test="field != null">
        field,
      </if>
      <if test="taxAuthority != null">
        tax_authority,
      </if>
      <if test="ratepayMethod != null">
        ratepay_method,
      </if>
      <if test="highTechZone != null">
        high_tech_zone,
      </if>
      <if test="riskInvestment != null">
        risk_investment,
      </if>
      <if test="businessScope != null">
        business_scope,
      </if>
      <if test="highTechName != null">
        high_tech_name,
      </if>
      <if test="patentProryStatementUrl != null">
        patent_prory_statement_url,
      </if>
      <if test="international != null">
        international,
      </if>
      <if test="reviewInstructions != null">
        review_instructions,
      </if>
      <if test="investment != null">
        investment,
      </if>
      <if test="yearSalesAmount != null">
        year_sales_amount,
      </if>
      <if test="lastYearResearchAmount != null">
        last_year_research_amount,
      </if>
      <if test="assets != null">
        assets,
      </if>
      <if test="qualification != null">
        qualification,
      </if>
      <if test="cooperationSituation != null">
        cooperation_situation,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="uid != null">
        #{uid,jdbcType=VARCHAR},
      </if>
      <if test="contacts != null">
        #{contacts,jdbcType=VARCHAR},
      </if>
      <if test="contactMobile != null">
        #{contactMobile,jdbcType=VARCHAR},
      </if>
      <if test="fixedTel != null">
        #{fixedTel,jdbcType=VARCHAR},
      </if>
      <if test="qq != null">
        #{qq,jdbcType=VARCHAR},
      </if>
      <if test="postalAddress != null">
        #{postalAddress,jdbcType=VARCHAR},
      </if>
      <if test="postcode != null">
        #{postcode,jdbcType=VARCHAR},
      </if>
      <if test="unitName != null">
        #{unitName,jdbcType=VARCHAR},
      </if>
      <if test="registeredCapital != null">
        #{registeredCapital,jdbcType=DECIMAL},
      </if>
      <if test="licenceNumber != null">
        #{licenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="licenceProvince != null">
        #{licenceProvince,jdbcType=INTEGER},
      </if>
      <if test="licenceCity != null">
        #{licenceCity,jdbcType=INTEGER},
      </if>
      <if test="licenceArea != null">
        #{licenceArea,jdbcType=INTEGER},
      </if>
      <if test="licenceScanningUrl != null">
        #{licenceScanningUrl,jdbcType=VARCHAR},
      </if>
      <if test="orgCode != null">
        #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="orgCodeUrl != null">
        #{orgCodeUrl,jdbcType=VARCHAR},
      </if>
      <if test="bankAccount != null">
        #{bankAccount,jdbcType=VARCHAR},
      </if>
      <if test="banks != null">
        #{banks,jdbcType=VARCHAR},
      </if>
      <if test="bankBranch != null">
        #{bankBranch,jdbcType=VARCHAR},
      </if>
      <if test="bankCardNumber != null">
        #{bankCardNumber,jdbcType=VARCHAR},
      </if>
      <if test="validationAmount != null">
        #{validationAmount,jdbcType=DECIMAL},
      </if>
      <if test="identityType != null">
        #{identityType,jdbcType=INTEGER},
      </if>
      <if test="locationProvince != null">
        #{locationProvince,jdbcType=INTEGER},
      </if>
      <if test="locationCity != null">
        #{locationCity,jdbcType=INTEGER},
      </if>
      <if test="locationArea != null">
        #{locationArea,jdbcType=INTEGER},
      </if>
      <if test="legalPerson != null">
        #{legalPerson,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonIdCard != null">
        #{legalPersonIdCard,jdbcType=VARCHAR},
      </if>
      <if test="lastYearTaxReportUrl != null">
        #{lastYearTaxReportUrl,jdbcType=VARCHAR},
      </if>
      <if test="auditStatus != null">
        #{auditStatus,jdbcType=INTEGER},
      </if>
      <if test="process != null">
        #{process,jdbcType=INTEGER},
      </if>
      <if test="wrongCount != null">
        #{wrongCount,jdbcType=INTEGER},
      </if>
      <if test="paymentDate != null">
        #{paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="listed != null">
        #{listed,jdbcType=INTEGER},
      </if>
      <if test="listedDate != null">
        #{listedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="listedType != null">
        #{listedType,jdbcType=INTEGER},
      </if>
      <if test="stockCode != null">
        #{stockCode,jdbcType=VARCHAR},
      </if>
      <if test="certificateNumber != null">
        #{certificateNumber,jdbcType=VARCHAR},
      </if>
      <if test="issuingDate != null">
        #{issuingDate,jdbcType=TIMESTAMP},
      </if>
      <if test="cogContacts != null">
        #{cogContacts,jdbcType=INTEGER},
      </if>
      <if test="techPrincipal != null">
        #{techPrincipal,jdbcType=VARCHAR},
      </if>
      <if test="contactsFixedTel != null">
        #{contactsFixedTel,jdbcType=VARCHAR},
      </if>
      <if test="contactsFax != null">
        #{contactsFax,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonTel != null">
        #{legalPersonTel,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonFax != null">
        #{legalPersonFax,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonEmail != null">
        #{legalPersonEmail,jdbcType=VARCHAR},
      </if>
      <if test="registrationTime != null">
        #{registrationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="ratepayCode != null">
        #{ratepayCode,jdbcType=VARCHAR},
      </if>
      <if test="industry != null">
        #{industry,jdbcType=INTEGER},
      </if>
      <if test="enterpriseScale != null">
        #{enterpriseScale,jdbcType=VARCHAR},
      </if>
      <if test="registerType != null">
        #{registerType,jdbcType=VARCHAR},
      </if>
      <if test="foreignInvestment != null">
        #{foreignInvestment,jdbcType=VARCHAR},
      </if>
      <if test="field != null">
        #{field,jdbcType=VARCHAR},
      </if>
      <if test="taxAuthority != null">
        #{taxAuthority,jdbcType=INTEGER},
      </if>
      <if test="ratepayMethod != null">
        #{ratepayMethod,jdbcType=INTEGER},
      </if>
      <if test="highTechZone != null">
        #{highTechZone,jdbcType=INTEGER},
      </if>
      <if test="riskInvestment != null">
        #{riskInvestment,jdbcType=INTEGER},
      </if>
      <if test="businessScope != null">
        #{businessScope,jdbcType=VARCHAR},
      </if>
      <if test="highTechName != null">
        #{highTechName,jdbcType=VARCHAR},
      </if>
      <if test="patentProryStatementUrl != null">
        #{patentProryStatementUrl,jdbcType=VARCHAR},
      </if>
      <if test="international != null">
        #{international,jdbcType=INTEGER},
      </if>
      <if test="reviewInstructions != null">
        #{reviewInstructions,jdbcType=VARCHAR},
      </if>
      <if test="investment != null">
        #{investment,jdbcType=INTEGER},
      </if>
      <if test="yearSalesAmount != null">
        #{yearSalesAmount,jdbcType=DECIMAL},
      </if>
      <if test="lastYearResearchAmount != null">
        #{lastYearResearchAmount,jdbcType=DECIMAL},
      </if>
      <if test="assets != null">
        #{assets,jdbcType=DECIMAL},
      </if>
      <if test="qualification != null">
        #{qualification,jdbcType=VARCHAR},
      </if>
      <if test="cooperationSituation != null">
        #{cooperationSituation,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.goafanti.common.model.OrganizationIdentityExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    select count(*) from organization_identity
    <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 Wed Jun 06 10:26:09 CST 2018.
    -->
    update organization_identity
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.uid != null">
        uid = #{record.uid,jdbcType=VARCHAR},
      </if>
      <if test="record.contacts != null">
        contacts = #{record.contacts,jdbcType=VARCHAR},
      </if>
      <if test="record.contactMobile != null">
        contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
      </if>
      <if test="record.fixedTel != null">
        fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
      </if>
      <if test="record.qq != null">
        qq = #{record.qq,jdbcType=VARCHAR},
      </if>
      <if test="record.postalAddress != null">
        postal_address = #{record.postalAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.postcode != null">
        postcode = #{record.postcode,jdbcType=VARCHAR},
      </if>
      <if test="record.unitName != null">
        unit_name = #{record.unitName,jdbcType=VARCHAR},
      </if>
      <if test="record.registeredCapital != null">
        registered_capital = #{record.registeredCapital,jdbcType=DECIMAL},
      </if>
      <if test="record.licenceNumber != null">
        licence_number = #{record.licenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.licenceProvince != null">
        licence_province = #{record.licenceProvince,jdbcType=INTEGER},
      </if>
      <if test="record.licenceCity != null">
        licence_city = #{record.licenceCity,jdbcType=INTEGER},
      </if>
      <if test="record.licenceArea != null">
        licence_area = #{record.licenceArea,jdbcType=INTEGER},
      </if>
      <if test="record.licenceScanningUrl != null">
        licence_scanning_url = #{record.licenceScanningUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.orgCode != null">
        org_code = #{record.orgCode,jdbcType=VARCHAR},
      </if>
      <if test="record.orgCodeUrl != null">
        org_code_url = #{record.orgCodeUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.bankAccount != null">
        bank_account = #{record.bankAccount,jdbcType=VARCHAR},
      </if>
      <if test="record.banks != null">
        banks = #{record.banks,jdbcType=VARCHAR},
      </if>
      <if test="record.bankBranch != null">
        bank_branch = #{record.bankBranch,jdbcType=VARCHAR},
      </if>
      <if test="record.bankCardNumber != null">
        bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.validationAmount != null">
        validation_amount = #{record.validationAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.identityType != null">
        identity_type = #{record.identityType,jdbcType=INTEGER},
      </if>
      <if test="record.locationProvince != null">
        location_province = #{record.locationProvince,jdbcType=INTEGER},
      </if>
      <if test="record.locationCity != null">
        location_city = #{record.locationCity,jdbcType=INTEGER},
      </if>
      <if test="record.locationArea != null">
        location_area = #{record.locationArea,jdbcType=INTEGER},
      </if>
      <if test="record.legalPerson != null">
        legal_person = #{record.legalPerson,jdbcType=VARCHAR},
      </if>
      <if test="record.legalPersonIdCard != null">
        legal_person_id_card = #{record.legalPersonIdCard,jdbcType=VARCHAR},
      </if>
      <if test="record.lastYearTaxReportUrl != null">
        last_year_tax_report_url = #{record.lastYearTaxReportUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.auditStatus != null">
        audit_status = #{record.auditStatus,jdbcType=INTEGER},
      </if>
      <if test="record.process != null">
        process = #{record.process,jdbcType=INTEGER},
      </if>
      <if test="record.wrongCount != null">
        wrong_count = #{record.wrongCount,jdbcType=INTEGER},
      </if>
      <if test="record.paymentDate != null">
        payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.listed != null">
        listed = #{record.listed,jdbcType=INTEGER},
      </if>
      <if test="record.listedDate != null">
        listed_date = #{record.listedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.listedType != null">
        listed_type = #{record.listedType,jdbcType=INTEGER},
      </if>
      <if test="record.stockCode != null">
        stock_code = #{record.stockCode,jdbcType=VARCHAR},
      </if>
      <if test="record.certificateNumber != null">
        certificate_number = #{record.certificateNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.issuingDate != null">
        issuing_date = #{record.issuingDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.cogContacts != null">
        cog_contacts = #{record.cogContacts,jdbcType=INTEGER},
      </if>
      <if test="record.techPrincipal != null">
        tech_principal = #{record.techPrincipal,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsFixedTel != null">
        contacts_fixed_tel = #{record.contactsFixedTel,jdbcType=VARCHAR},
      </if>
      <if test="record.contactsFax != null">
        contacts_fax = #{record.contactsFax,jdbcType=VARCHAR},
      </if>
      <if test="record.legalPersonTel != null">
        legal_person_tel = #{record.legalPersonTel,jdbcType=VARCHAR},
      </if>
      <if test="record.legalPersonFax != null">
        legal_person_fax = #{record.legalPersonFax,jdbcType=VARCHAR},
      </if>
      <if test="record.legalPersonEmail != null">
        legal_person_email = #{record.legalPersonEmail,jdbcType=VARCHAR},
      </if>
      <if test="record.registrationTime != null">
        registration_time = #{record.registrationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.ratepayCode != null">
        ratepay_code = #{record.ratepayCode,jdbcType=VARCHAR},
      </if>
      <if test="record.industry != null">
        industry = #{record.industry,jdbcType=INTEGER},
      </if>
      <if test="record.enterpriseScale != null">
        enterprise_scale = #{record.enterpriseScale,jdbcType=VARCHAR},
      </if>
      <if test="record.registerType != null">
        register_type = #{record.registerType,jdbcType=VARCHAR},
      </if>
      <if test="record.foreignInvestment != null">
        foreign_investment = #{record.foreignInvestment,jdbcType=VARCHAR},
      </if>
      <if test="record.field != null">
        field = #{record.field,jdbcType=VARCHAR},
      </if>
      <if test="record.taxAuthority != null">
        tax_authority = #{record.taxAuthority,jdbcType=INTEGER},
      </if>
      <if test="record.ratepayMethod != null">
        ratepay_method = #{record.ratepayMethod,jdbcType=INTEGER},
      </if>
      <if test="record.highTechZone != null">
        high_tech_zone = #{record.highTechZone,jdbcType=INTEGER},
      </if>
      <if test="record.riskInvestment != null">
        risk_investment = #{record.riskInvestment,jdbcType=INTEGER},
      </if>
      <if test="record.businessScope != null">
        business_scope = #{record.businessScope,jdbcType=VARCHAR},
      </if>
      <if test="record.highTechName != null">
        high_tech_name = #{record.highTechName,jdbcType=VARCHAR},
      </if>
      <if test="record.patentProryStatementUrl != null">
        patent_prory_statement_url = #{record.patentProryStatementUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.international != null">
        international = #{record.international,jdbcType=INTEGER},
      </if>
      <if test="record.reviewInstructions != null">
        review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
      </if>
      <if test="record.investment != null">
        investment = #{record.investment,jdbcType=INTEGER},
      </if>
      <if test="record.yearSalesAmount != null">
        year_sales_amount = #{record.yearSalesAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.lastYearResearchAmount != null">
        last_year_research_amount = #{record.lastYearResearchAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.assets != null">
        assets = #{record.assets,jdbcType=DECIMAL},
      </if>
      <if test="record.qualification != null">
        qualification = #{record.qualification,jdbcType=VARCHAR},
      </if>
      <if test="record.cooperationSituation != null">
        cooperation_situation = #{record.cooperationSituation,jdbcType=VARCHAR},
      </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 Wed Jun 06 10:26:09 CST 2018.
    -->
    update organization_identity
    set id = #{record.id,jdbcType=VARCHAR},
      uid = #{record.uid,jdbcType=VARCHAR},
      contacts = #{record.contacts,jdbcType=VARCHAR},
      contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
      fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
      qq = #{record.qq,jdbcType=VARCHAR},
      postal_address = #{record.postalAddress,jdbcType=VARCHAR},
      postcode = #{record.postcode,jdbcType=VARCHAR},
      unit_name = #{record.unitName,jdbcType=VARCHAR},
      registered_capital = #{record.registeredCapital,jdbcType=DECIMAL},
      licence_number = #{record.licenceNumber,jdbcType=VARCHAR},
      licence_province = #{record.licenceProvince,jdbcType=INTEGER},
      licence_city = #{record.licenceCity,jdbcType=INTEGER},
      licence_area = #{record.licenceArea,jdbcType=INTEGER},
      licence_scanning_url = #{record.licenceScanningUrl,jdbcType=VARCHAR},
      org_code = #{record.orgCode,jdbcType=VARCHAR},
      org_code_url = #{record.orgCodeUrl,jdbcType=VARCHAR},
      bank_account = #{record.bankAccount,jdbcType=VARCHAR},
      banks = #{record.banks,jdbcType=VARCHAR},
      bank_branch = #{record.bankBranch,jdbcType=VARCHAR},
      bank_card_number = #{record.bankCardNumber,jdbcType=VARCHAR},
      validation_amount = #{record.validationAmount,jdbcType=DECIMAL},
      identity_type = #{record.identityType,jdbcType=INTEGER},
      location_province = #{record.locationProvince,jdbcType=INTEGER},
      location_city = #{record.locationCity,jdbcType=INTEGER},
      location_area = #{record.locationArea,jdbcType=INTEGER},
      legal_person = #{record.legalPerson,jdbcType=VARCHAR},
      legal_person_id_card = #{record.legalPersonIdCard,jdbcType=VARCHAR},
      last_year_tax_report_url = #{record.lastYearTaxReportUrl,jdbcType=VARCHAR},
      audit_status = #{record.auditStatus,jdbcType=INTEGER},
      process = #{record.process,jdbcType=INTEGER},
      wrong_count = #{record.wrongCount,jdbcType=INTEGER},
      payment_date = #{record.paymentDate,jdbcType=TIMESTAMP},
      listed = #{record.listed,jdbcType=INTEGER},
      listed_date = #{record.listedDate,jdbcType=TIMESTAMP},
      listed_type = #{record.listedType,jdbcType=INTEGER},
      stock_code = #{record.stockCode,jdbcType=VARCHAR},
      certificate_number = #{record.certificateNumber,jdbcType=VARCHAR},
      issuing_date = #{record.issuingDate,jdbcType=TIMESTAMP},
      cog_contacts = #{record.cogContacts,jdbcType=INTEGER},
      tech_principal = #{record.techPrincipal,jdbcType=VARCHAR},
      contacts_fixed_tel = #{record.contactsFixedTel,jdbcType=VARCHAR},
      contacts_fax = #{record.contactsFax,jdbcType=VARCHAR},
      legal_person_tel = #{record.legalPersonTel,jdbcType=VARCHAR},
      legal_person_fax = #{record.legalPersonFax,jdbcType=VARCHAR},
      legal_person_email = #{record.legalPersonEmail,jdbcType=VARCHAR},
      registration_time = #{record.registrationTime,jdbcType=TIMESTAMP},
      ratepay_code = #{record.ratepayCode,jdbcType=VARCHAR},
      industry = #{record.industry,jdbcType=INTEGER},
      enterprise_scale = #{record.enterpriseScale,jdbcType=VARCHAR},
      register_type = #{record.registerType,jdbcType=VARCHAR},
      foreign_investment = #{record.foreignInvestment,jdbcType=VARCHAR},
      field = #{record.field,jdbcType=VARCHAR},
      tax_authority = #{record.taxAuthority,jdbcType=INTEGER},
      ratepay_method = #{record.ratepayMethod,jdbcType=INTEGER},
      high_tech_zone = #{record.highTechZone,jdbcType=INTEGER},
      risk_investment = #{record.riskInvestment,jdbcType=INTEGER},
      business_scope = #{record.businessScope,jdbcType=VARCHAR},
      high_tech_name = #{record.highTechName,jdbcType=VARCHAR},
      patent_prory_statement_url = #{record.patentProryStatementUrl,jdbcType=VARCHAR},
      international = #{record.international,jdbcType=INTEGER},
      review_instructions = #{record.reviewInstructions,jdbcType=VARCHAR},
      investment = #{record.investment,jdbcType=INTEGER},
      year_sales_amount = #{record.yearSalesAmount,jdbcType=DECIMAL},
      last_year_research_amount = #{record.lastYearResearchAmount,jdbcType=DECIMAL},
      assets = #{record.assets,jdbcType=DECIMAL},
      qualification = #{record.qualification,jdbcType=VARCHAR},
      cooperation_situation = #{record.cooperationSituation,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    update organization_identity
    <set>
      <if test="uid != null">
        uid = #{uid,jdbcType=VARCHAR},
      </if>
      <if test="contacts != null">
        contacts = #{contacts,jdbcType=VARCHAR},
      </if>
      <if test="contactMobile != null">
        contact_mobile = #{contactMobile,jdbcType=VARCHAR},
      </if>
      <if test="fixedTel != null">
        fixed_tel = #{fixedTel,jdbcType=VARCHAR},
      </if>
      <if test="qq != null">
        qq = #{qq,jdbcType=VARCHAR},
      </if>
      <if test="postalAddress != null">
        postal_address = #{postalAddress,jdbcType=VARCHAR},
      </if>
      <if test="postcode != null">
        postcode = #{postcode,jdbcType=VARCHAR},
      </if>
      <if test="unitName != null">
        unit_name = #{unitName,jdbcType=VARCHAR},
      </if>
      <if test="registeredCapital != null">
        registered_capital = #{registeredCapital,jdbcType=DECIMAL},
      </if>
      <if test="licenceNumber != null">
        licence_number = #{licenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="licenceProvince != null">
        licence_province = #{licenceProvince,jdbcType=INTEGER},
      </if>
      <if test="licenceCity != null">
        licence_city = #{licenceCity,jdbcType=INTEGER},
      </if>
      <if test="licenceArea != null">
        licence_area = #{licenceArea,jdbcType=INTEGER},
      </if>
      <if test="licenceScanningUrl != null">
        licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
      </if>
      <if test="orgCode != null">
        org_code = #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="orgCodeUrl != null">
        org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
      </if>
      <if test="bankAccount != null">
        bank_account = #{bankAccount,jdbcType=VARCHAR},
      </if>
      <if test="banks != null">
        banks = #{banks,jdbcType=VARCHAR},
      </if>
      <if test="bankBranch != null">
        bank_branch = #{bankBranch,jdbcType=VARCHAR},
      </if>
      <if test="bankCardNumber != null">
        bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
      </if>
      <if test="validationAmount != null">
        validation_amount = #{validationAmount,jdbcType=DECIMAL},
      </if>
      <if test="identityType != null">
        identity_type = #{identityType,jdbcType=INTEGER},
      </if>
      <if test="locationProvince != null">
        location_province = #{locationProvince,jdbcType=INTEGER},
      </if>
      <if test="locationCity != null">
        location_city = #{locationCity,jdbcType=INTEGER},
      </if>
      <if test="locationArea != null">
        location_area = #{locationArea,jdbcType=INTEGER},
      </if>
      <if test="legalPerson != null">
        legal_person = #{legalPerson,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonIdCard != null">
        legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
      </if>
      <if test="lastYearTaxReportUrl != null">
        last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
      </if>
      <if test="auditStatus != null">
        audit_status = #{auditStatus,jdbcType=INTEGER},
      </if>
      <if test="process != null">
        process = #{process,jdbcType=INTEGER},
      </if>
      <if test="wrongCount != null">
        wrong_count = #{wrongCount,jdbcType=INTEGER},
      </if>
      <if test="paymentDate != null">
        payment_date = #{paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="listed != null">
        listed = #{listed,jdbcType=INTEGER},
      </if>
      <if test="listedDate != null">
        listed_date = #{listedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="listedType != null">
        listed_type = #{listedType,jdbcType=INTEGER},
      </if>
      <if test="stockCode != null">
        stock_code = #{stockCode,jdbcType=VARCHAR},
      </if>
      <if test="certificateNumber != null">
        certificate_number = #{certificateNumber,jdbcType=VARCHAR},
      </if>
      <if test="issuingDate != null">
        issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
      </if>
      <if test="cogContacts != null">
        cog_contacts = #{cogContacts,jdbcType=INTEGER},
      </if>
      <if test="techPrincipal != null">
        tech_principal = #{techPrincipal,jdbcType=VARCHAR},
      </if>
      <if test="contactsFixedTel != null">
        contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
      </if>
      <if test="contactsFax != null">
        contacts_fax = #{contactsFax,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonTel != null">
        legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonFax != null">
        legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonEmail != null">
        legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
      </if>
      <if test="registrationTime != null">
        registration_time = #{registrationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="ratepayCode != null">
        ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
      </if>
      <if test="industry != null">
        industry = #{industry,jdbcType=INTEGER},
      </if>
      <if test="enterpriseScale != null">
        enterprise_scale = #{enterpriseScale,jdbcType=VARCHAR},
      </if>
      <if test="registerType != null">
        register_type = #{registerType,jdbcType=VARCHAR},
      </if>
      <if test="foreignInvestment != null">
        foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
      </if>
      <if test="field != null">
        field = #{field,jdbcType=VARCHAR},
      </if>
      <if test="taxAuthority != null">
        tax_authority = #{taxAuthority,jdbcType=INTEGER},
      </if>
      <if test="ratepayMethod != null">
        ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
      </if>
      <if test="highTechZone != null">
        high_tech_zone = #{highTechZone,jdbcType=INTEGER},
      </if>
      <if test="riskInvestment != null">
        risk_investment = #{riskInvestment,jdbcType=INTEGER},
      </if>
      <if test="businessScope != null">
        business_scope = #{businessScope,jdbcType=VARCHAR},
      </if>
      <if test="highTechName != null">
        high_tech_name = #{highTechName,jdbcType=VARCHAR},
      </if>
      <if test="patentProryStatementUrl != null">
        patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
      </if>
      <if test="international != null">
        international = #{international,jdbcType=INTEGER},
      </if>
      <if test="reviewInstructions != null">
        review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
      </if>
      <if test="investment != null">
        investment = #{investment,jdbcType=INTEGER},
      </if>
      <if test="yearSalesAmount != null">
        year_sales_amount = #{yearSalesAmount,jdbcType=DECIMAL},
      </if>
      <if test="lastYearResearchAmount != null">
        last_year_research_amount = #{lastYearResearchAmount,jdbcType=DECIMAL},
      </if>
      <if test="assets != null">
        assets = #{assets,jdbcType=DECIMAL},
      </if>
      <if test="qualification != null">
        qualification = #{qualification,jdbcType=VARCHAR},
      </if>
      <if test="cooperationSituation != null">
        cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jun 06 10:26:09 CST 2018.
    -->
    update organization_identity
    set uid = #{uid,jdbcType=VARCHAR},
      contacts = #{contacts,jdbcType=VARCHAR},
      contact_mobile = #{contactMobile,jdbcType=VARCHAR},
      fixed_tel = #{fixedTel,jdbcType=VARCHAR},
      qq = #{qq,jdbcType=VARCHAR},
      postal_address = #{postalAddress,jdbcType=VARCHAR},
      postcode = #{postcode,jdbcType=VARCHAR},
      unit_name = #{unitName,jdbcType=VARCHAR},
      registered_capital = #{registeredCapital,jdbcType=DECIMAL},
      licence_number = #{licenceNumber,jdbcType=VARCHAR},
      licence_province = #{licenceProvince,jdbcType=INTEGER},
      licence_city = #{licenceCity,jdbcType=INTEGER},
      licence_area = #{licenceArea,jdbcType=INTEGER},
      licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
      org_code = #{orgCode,jdbcType=VARCHAR},
      org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
      bank_account = #{bankAccount,jdbcType=VARCHAR},
      banks = #{banks,jdbcType=VARCHAR},
      bank_branch = #{bankBranch,jdbcType=VARCHAR},
      bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
      validation_amount = #{validationAmount,jdbcType=DECIMAL},
      identity_type = #{identityType,jdbcType=INTEGER},
      location_province = #{locationProvince,jdbcType=INTEGER},
      location_city = #{locationCity,jdbcType=INTEGER},
      location_area = #{locationArea,jdbcType=INTEGER},
      legal_person = #{legalPerson,jdbcType=VARCHAR},
      legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
      last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
      audit_status = #{auditStatus,jdbcType=INTEGER},
      process = #{process,jdbcType=INTEGER},
      wrong_count = #{wrongCount,jdbcType=INTEGER},
      payment_date = #{paymentDate,jdbcType=TIMESTAMP},
      listed = #{listed,jdbcType=INTEGER},
      listed_date = #{listedDate,jdbcType=TIMESTAMP},
      listed_type = #{listedType,jdbcType=INTEGER},
      stock_code = #{stockCode,jdbcType=VARCHAR},
      certificate_number = #{certificateNumber,jdbcType=VARCHAR},
      issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
      cog_contacts = #{cogContacts,jdbcType=INTEGER},
      tech_principal = #{techPrincipal,jdbcType=VARCHAR},
      contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
      contacts_fax = #{contactsFax,jdbcType=VARCHAR},
      legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
      legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
      legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
      registration_time = #{registrationTime,jdbcType=TIMESTAMP},
      ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
      industry = #{industry,jdbcType=INTEGER},
      enterprise_scale = #{enterpriseScale,jdbcType=VARCHAR},
      register_type = #{registerType,jdbcType=VARCHAR},
      foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
      field = #{field,jdbcType=VARCHAR},
      tax_authority = #{taxAuthority,jdbcType=INTEGER},
      ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
      high_tech_zone = #{highTechZone,jdbcType=INTEGER},
      risk_investment = #{riskInvestment,jdbcType=INTEGER},
      business_scope = #{businessScope,jdbcType=VARCHAR},
      high_tech_name = #{highTechName,jdbcType=VARCHAR},
      patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
      international = #{international,jdbcType=INTEGER},
      review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
      investment = #{investment,jdbcType=INTEGER},
      year_sales_amount = #{yearSalesAmount,jdbcType=DECIMAL},
      last_year_research_amount = #{lastYearResearchAmount,jdbcType=DECIMAL},
      assets = #{assets,jdbcType=DECIMAL},
      qualification = #{qualification,jdbcType=VARCHAR},
      cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
	<select id="selectOrgIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
		select
		<include refid="Base_Column_List" />
		from organization_identity
		where uid = #{uid,jdbcType=VARCHAR}
	</select>


	<select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityBo">
		select 
		t.id,t.uid,t.contacts,t.fixed_tel as fixedTel,
		t.qq,t.postal_address
		as postalAddress ,t.postcode,
		u.email ,t.legal_person
		as legalPerson
		from user u LEFT JOIN organization_identity t
		on t.uid =
		u.id
		where t.uid=#{uid,jdbcType=VARCHAR}
	</select>

	<select id="selectAllOrgIndentity" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgUnitNames">
		select u.id as uid, i.unit_name as unitName
		from user u INNER JOIN
		organization_identity i on u.id = i.uid 
		where
		i.audit_status = 5
		 and u.lvl &gt; 0
		<if test="_parameter != null">
			and u.aid = #{aid,jdbcType=VARCHAR}
		</if>
	</select>

	<select id="selectBasicInfo" resultType="com.goafanti.user.bo.OrgBasicInfoBo">
		select oi.id,
		oi.uid as
		uid, oi.unit_name as unitName, oi.licence_province as licenceProvince,
		oi.licence_city as licenceCity, oi.licence_area as licenceArea, oi.postal_address as
		postalAddress,
		oi.contacts_fixed_tel as
		contactsFixedTel, oi.contacts_fax as
		contactsFax,oi.legal_person_tel as
		legalPersonTel,
		oi.legal_person_fax as legalPersonFax,
		oi.legal_person_email as legalPersonEmail,
		oi.registered_capital as
		registeredCapital,
		oi.registration_time as registrationTime,
		oi.legal_person as legalPerson,
		oi.legal_person_id_card as
		legalPersonIdCard, oi.org_code as orgCode,
		oi.ratepay_code as
		ratepayCode, oi.industry, oi.enterprise_scale as
		enterpriseScale,
		oi.register_type as registerType,
		oi.foreign_investment as
		foreignInvestment, oi.field, oi.tax_authority
		as taxAuthority,
		oi.listed_date as listedDate,
		oi.ratepay_method as ratepayMethod,
		oi.listed, oi.high_tech_zone as highTechZone,
		oi.risk_investment as
		riskInvestment, oi.stock_code as stockCode,
		oi.business_scope as
		businessScope, oi.high_tech_name as highTechName,
		oi.listed_type as
		listedType,
		ohr.id as hid, ohr.firm_total as firmTotal, ohr.tech_total
		as techTotal
		from organization_identity oi
		LEFT JOIN org_human_resource
		ohr
		on oi.uid = ohr.uid and ohr.year = #{1}
		where oi.uid = #{0}
	</select>
	
	<select id="selectOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityDetailBo">
		select 
			id, uid, unit_name as unitName, identity_type as identityType,
			legal_person as legalPerson, legal_person_id_card as legalPersonIdCard, registration_time as registrationTime,
			licence_number as licenceNumber, licence_province as licenceProvince, licence_city as licenceCity,
			licence_area as licenceArea, licence_scanning_url as licenceScanningUrl, org_code as orgCode,
			org_code_url as orgCodeUrl, banks, bank_branch as bankBranch, bank_card_number as bankCardNumber,
			location_province as locationProvince, location_city as locationCity, location_area as locationArea,
			validation_amount as validationAmount, payment_date as paymentDate, audit_status as auditStatus, 
			last_year_tax_report_url as lastYearTaxReportUrl
		from organization_identity 
		where uid = #{uid,jdbcType=VARCHAR}
	</select>
	
	
	<select id="selectAuditorOrgIdentityDetailByUserId" resultType="com.goafanti.user.bo.AuditorOrgIdentityDetailBo">
		select  
			 u.aid, u.mid, u.lvl,
			 oi.id, oi.uid, oi.unit_name as unitName,  oi.identity_type as identityType,
			 oi.legal_person as legalPerson,  oi.legal_person_id_card as legalPersonIdCard,  oi.registration_time as registrationTime,
			 oi.licence_number as licenceNumber,  oi.licence_province as licenceProvince,  oi.licence_city as licenceCity,
			 oi.licence_area as licenceArea,  oi.licence_scanning_url as licenceScanningUrl,  oi.org_code as orgCode,
			 oi.org_code_url as orgCodeUrl,  oi.banks, bank_branch as bankBranch,  oi.bank_card_number as bankCardNumber,
			 oi.location_province as locationProvince,  oi.location_city as locationCity,  oi.location_area as locationArea,
			 oi.validation_amount as validationAmount,  oi.payment_date as paymentDate,  oi.audit_status as auditStatus,
			 oi.last_year_tax_report_url as lastYearTaxReportUrl, oi.field, oi.registered_capital as registeredCapital,
			 ratepay.id as ratepayId
		from user u 
		LEFT JOIN organization_identity oi on oi.uid = u.id
		LEFT JOIN org_ratepay ratepay on ratepay.uid = u.id and ratepay.year = #{year,jdbcType=INTEGER} and deleted_sign = 0
		where u.id = #{uid,jdbcType=VARCHAR}
	</select>
	
	<select id="selectManagerUnitNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgUnitNames">
		select u.id as uid, i.unit_name as unitName
		from user u INNER JOIN
		organization_identity i on u.id = i.uid 
		where u.lvl = 1
		<if test="_parameter != null">
			and u.mid = #{aid,jdbcType=VARCHAR}
		</if>
	</select>
	

	
	
	
	<select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.organization.bo.OrgSubscriberListBo">
			SELECT
				u.id as uid, 
				oi.unit_name as unitName, 
				u.number,
				oi.id as identityId, 
				info.logo_url as logoUrl,
				oi.licence_province as province,
				adc.achievement_count as achievementNum,
				adc.demand_count as demandNum
			FROM
				<![CDATA[ user ]]> u
			LEFT JOIN organization_identity oi ON oi.uid = u.id
			LEFT JOIN organization_info info on info.uid = u.id
			LEFT JOIN organization_tech ot on ot.uid = u.id
			LEFT JOIN achievement_demand_count adc on adc.uid = u.id
			WHERE
				u.type = 1
			<if test="null != level and level==1 ">
				AND u.lvl <![CDATA[ >= ]]> 1 
			</if>
			<if test="null !=level and level==0">
				AND u.lvl = 0
			</if>
			<if test="province != null">
				AND oi.licence_province = #{province,jdbcType=INTEGER}
			</if>
			<if test="city != null">
				AND oi.licence_city = #{city,jdbcType=INTEGER}
			</if>
			<if test="area != null">
				AND oi.licence_area = #{area,jdbcType=INTEGER}
			</if>
			<if test="field != null">
				AND ot.search_area_category like CONCAT(#{field,jdbcType=VARCHAR},'%')
			</if>
			<if test="name != null">
				AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
			</if>
		ORDER BY u.number 
		<if test="page_sql!=null">
			${page_sql}
		</if>
  </select>
  
  <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
	 	SELECT 
		 	count(1)
		FROM
		<![CDATA[ user ]]> u
			LEFT JOIN organization_identity oi ON oi.uid = u.id
			LEFT JOIN organization_info info on info.uid = u.id
			LEFT JOIN organization_tech ot on ot.uid = u.id
			WHERE
				u.type = 1
			<if test="null != level and level==1 ">
				AND u.lvl <![CDATA[ >= ]]> 1 
			</if>
			<if test="null !=level and level==0">
				AND u.lvl = 0
			</if>
			<if test="province != null">
				AND oi.licence_province = #{province,jdbcType=INTEGER}
			</if>
			<if test="city != null">
				AND oi.licence_city = #{city,jdbcType=INTEGER}
			</if>
			<if test="area != null">
				AND oi.licence_area = #{area,jdbcType=INTEGER}
			</if>
			<if test="field != null">
				AND ot.search_area_category like CONCAT(#{field,jdbcType=VARCHAR},'%')
			</if>
			<if test="name != null">
				AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
			</if>
  </select>
  
  <update id="updateServiceByUid" parameterType="com.goafanti.common.model.OrganizationIdentity">
   
    update organization_identity
    <set>
      <if test="contacts != null">
        contacts = #{contacts,jdbcType=VARCHAR},
      </if>
      <if test="contactMobile != null">
        contact_mobile = #{contactMobile,jdbcType=VARCHAR},
      </if>
      <if test="fixedTel != null">
        fixed_tel = #{fixedTel,jdbcType=VARCHAR},
      </if>
      <if test="qq != null">
        qq = #{qq,jdbcType=VARCHAR},
      </if>
      <if test="postalAddress != null">
        postal_address = #{postalAddress,jdbcType=VARCHAR},
      </if>
      <if test="postcode != null">
        postcode = #{postcode,jdbcType=VARCHAR},
      </if>
      <if test="unitName != null">
        unit_name = #{unitName,jdbcType=VARCHAR},
      </if>
      <if test="registeredCapital != null">
        registered_capital = #{registeredCapital,jdbcType=DECIMAL},
      </if>
      <if test="licenceNumber != null">
        licence_number = #{licenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="licenceProvince != null">
        licence_province = #{licenceProvince,jdbcType=INTEGER},
      </if>
      <if test="licenceCity != null">
        licence_city = #{licenceCity,jdbcType=INTEGER},
      </if>
      <if test="licenceArea != null">
        licence_area = #{licenceArea,jdbcType=INTEGER},
      </if>
      <if test="licenceScanningUrl != null">
        licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
      </if>
      <if test="orgCode != null">
        org_code = #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="orgCodeUrl != null">
        org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
      </if>
      <if test="bankAccount != null">
        bank_account = #{bankAccount,jdbcType=VARCHAR},
      </if>
      <if test="banks != null">
        banks = #{banks,jdbcType=VARCHAR},
      </if>
      <if test="bankBranch != null">
        bank_branch = #{bankBranch,jdbcType=VARCHAR},
      </if>
      <if test="bankCardNumber != null">
        bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
      </if>
      <if test="validationAmount != null">
        validation_amount = #{validationAmount,jdbcType=DECIMAL},
      </if>
      <if test="identityType != null">
        identity_type = #{identityType,jdbcType=INTEGER},
      </if>
      <if test="locationProvince != null">
        location_province = #{locationProvince,jdbcType=INTEGER},
      </if>
      <if test="locationCity != null">
        location_city = #{locationCity,jdbcType=INTEGER},
      </if>
      <if test="locationArea != null">
        location_area = #{locationArea,jdbcType=INTEGER},
      </if>
      <if test="legalPerson != null">
        legal_person = #{legalPerson,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonIdCard != null">
        legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
      </if>
      <if test="lastYearTaxReportUrl != null">
        last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
      </if>
      <if test="auditStatus != null">
        audit_status = #{auditStatus,jdbcType=INTEGER},
      </if>
      <if test="process != null">
        process = #{process,jdbcType=INTEGER},
      </if>
      <if test="wrongCount != null">
        wrong_count = #{wrongCount,jdbcType=INTEGER},
      </if>
      <if test="paymentDate != null">
        payment_date = #{paymentDate,jdbcType=TIMESTAMP},
      </if>
      <if test="listed != null">
        listed = #{listed,jdbcType=INTEGER},
      </if>
      <if test="listedDate != null">
        listed_date = #{listedDate,jdbcType=TIMESTAMP},
      </if>
      <if test="listedType != null">
        listed_type = #{listedType,jdbcType=INTEGER},
      </if>
      <if test="stockCode != null">
        stock_code = #{stockCode,jdbcType=VARCHAR},
      </if>
      <if test="certificateNumber != null">
        certificate_number = #{certificateNumber,jdbcType=VARCHAR},
      </if>
      <if test="issuingDate != null">
        issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
      </if>
      <if test="cogContacts != null">
        cog_contacts = #{cogContacts,jdbcType=INTEGER},
      </if>
      <if test="techPrincipal != null">
        tech_principal = #{techPrincipal,jdbcType=VARCHAR},
      </if>
      <if test="contactsFixedTel != null">
        contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
      </if>
      <if test="contactsFax != null">
        contacts_fax = #{contactsFax,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonTel != null">
        legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonFax != null">
        legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
      </if>
      <if test="legalPersonEmail != null">
        legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
      </if>
      <if test="registrationTime != null">
        registration_time = #{registrationTime,jdbcType=TIMESTAMP},
      </if>
      <if test="ratepayCode != null">
        ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
      </if>
      <if test="industry != null">
        industry = #{industry,jdbcType=INTEGER},
      </if>
      <if test="enterpriseScale != null">
        enterprise_scale = #{enterpriseScale,jdbcType=VARCHAR},
      </if>
      <if test="registerType != null">
        register_type = #{registerType,jdbcType=VARCHAR},
      </if>
      <if test="foreignInvestment != null">
        foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
      </if>
      <if test="field != null">
        field = #{field,jdbcType=VARCHAR},
      </if>
      <if test="taxAuthority != null">
        tax_authority = #{taxAuthority,jdbcType=INTEGER},
      </if>
      <if test="ratepayMethod != null">
        ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
      </if>
      <if test="highTechZone != null">
        high_tech_zone = #{highTechZone,jdbcType=INTEGER},
      </if>
      <if test="riskInvestment != null">
        risk_investment = #{riskInvestment,jdbcType=INTEGER},
      </if>
      <if test="businessScope != null">
        business_scope = #{businessScope,jdbcType=VARCHAR},
      </if>
      <if test="highTechName != null">
        high_tech_name = #{highTechName,jdbcType=VARCHAR},
      </if>
      <if test="patentProryStatementUrl != null">
        patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
      </if>
      <if test="international != null">
        international = #{international,jdbcType=INTEGER},
      </if>
      <if test="reviewInstructions != null">
        review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
      </if>
      <if test="investment != null">
        investment = #{investment,jdbcType=INTEGER},
      </if>
      <if test="yearSalesAmount != null">
        year_sales_amount = #{yearSalesAmount,jdbcType=DECIMAL},
      </if>
      <if test="lastYearResearchAmount != null">
        last_year_research_amount = #{lastYearResearchAmount,jdbcType=DECIMAL},
      </if>
      <if test="assets != null">
        assets = #{assets,jdbcType=DECIMAL},
      </if>
      <if test="qualification != null">
        qualification = #{qualification,jdbcType=VARCHAR},
      </if>
      <if test="cooperationSituation != null">
        cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
      </if>
    </set>
    where uid = #{uid,jdbcType=VARCHAR}
  </update>
</mapper>