<?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.slodon.b2b2c.dao.write.seller.StoreOpenAccountWriteMapper">
  <resultMap id="resultMap" type="com.slodon.b2b2c.seller.pojo.StoreOpenAccount">
    <id column="open_account_id" property="openAccountId" />
    <result column="store_id" property="storeId" />
    <result column="user_type" property="userType" />
    <result column="state" property="state" />
    <result column="bind_card_sn" property="bindCardSn" />
    <result column="image_collection_sn" property="imageCollectionSn" />
    <result column="open_account_sn" property="openAccountSn" />
    <result column="fail_reason" property="failReason" />
    <result column="bank_account_name" property="bankAccountName" />
    <result column="bank_account_number" property="bankAccountNumber" />
    <result column="bank_id" property="bankId" />
    <result column="bank_name" property="bankName" />
    <result column="credential_number" property="credentialNumber" />
    <result column="bank_phone_number" property="bankPhoneNumber" />
    <result column="branch_name" property="branchName" />
    <result column="province" property="province" />
    <result column="province_name" property="provinceName" />
    <result column="city" property="city" />
    <result column="city_name" property="cityName" />
    <result column="p_user_name" property="pUserName" />
    <result column="p_phone_number" property="pPhoneNumber" />
    <result column="p_credential_number" property="pCredentialNumber" />
    <result column="p_iss_date" property="pIssDate" />
    <result column="p_expiry_date" property="pExpiryDate" />
    <result column="p_ind_address" property="pIndAddress" />
    <result column="p_ind_email" property="pIndEmail" />
    <result column="p_ind_card_up" property="pIndCardUp" />
    <result column="p_ind_card_down" property="pIndCardDown" />
    <result column="e_corporation_name" property="eCorporationName" />
    <result column="e_category_type" property="eCategoryType" />
    <result column="e_category_type_name" property="eCategoryTypeName" />
    <result column="e_unified_social_credit_code" property="eUnifiedSocialCreditCode" />
    <result column="e_cor_email" property="eCorEmail" />
    <result column="e_cor_address" property="eCorAddress" />
    <result column="e_province" property="eProvince" />
    <result column="e_province_name" property="eProvinceName" />
    <result column="e_city" property="eCity" />
    <result column="e_city_name" property="eCityName" />
    <result column="e_district" property="eDistrict" />
    <result column="e_district_name" property="eDistrictName" />
    <result column="e_scale" property="eScale" />
    <result column="e_scale_name" property="eScaleName" />
    <result column="e_basic_acct_no" property="eBasicAcctNo" />
    <result column="e_approval_no" property="eApprovalNo" />
    <result column="e_all_licence_iss_date" property="eAllLicenceIssDate" />
    <result column="e_all_licence_expiry_date" property="eAllLicenceExpiryDate" />
    <result column="e_legal_person_name" property="eLegalPersonName" />
    <result column="e_legal_credential_number" property="eLegalCredentialNumber" />
    <result column="e_legal_person_iss_date" property="eLegalPersonIssDate" />
    <result column="e_legal_person_expiry_date" property="eLegalPersonExpiryDate" />
    <result column="e_legal_person_contact_number" property="eLegalPersonContactNumber" />
    <result column="e_business_license_image" property="eBusinessLicenseImage" />
    <result column="e_open_account_certificate" property="eOpenAccountCertificate" />
    <result column="e_legal_card_up" property="eLegalCardUp" />
    <result column="e_legal_card_down" property="eLegalCardDown" />
  </resultMap>
  <!--除主键外的所有字段，用于插入操作-->
  <sql id="columns">
    <trim suffixOverrides=",">
      <if test="storeId != null">
        `store_id`,
      </if>
      <if test="userType != null">
        `user_type`,
      </if>
      <if test="state != null">
        `state`,
      </if>
      <if test="bindCardSn != null">
        `bind_card_sn`,
      </if>
      <if test="imageCollectionSn != null">
        `image_collection_sn`,
      </if>
      <if test="openAccountSn != null">
        `open_account_sn`,
      </if>
      <if test="failReason != null">
        `fail_reason`,
      </if>
      <if test="bankAccountName != null">
        `bank_account_name`,
      </if>
      <if test="bankAccountNumber != null">
        `bank_account_number`,
      </if>
      <if test="bankId != null">
        `bank_id`,
      </if>
      <if test="bankName != null">
        `bank_name`,
      </if>
      <if test="credentialNumber != null">
        `credential_number`,
      </if>
      <if test="bankPhoneNumber != null">
        `bank_phone_number`,
      </if>
      <if test="branchName != null">
        `branch_name`,
      </if>
      <if test="province != null">
        `province`,
      </if>
      <if test="provinceName != null">
        `province_name`,
      </if>
      <if test="city != null">
        `city`,
      </if>
      <if test="cityName != null">
        `city_name`,
      </if>
      <if test="pUserName != null">
        `p_user_name`,
      </if>
      <if test="pPhoneNumber != null">
        `p_phone_number`,
      </if>
      <if test="pCredentialNumber != null">
        `p_credential_number`,
      </if>
      <if test="pIssDate != null">
        `p_iss_date`,
      </if>
      <if test="pExpiryDate != null">
        `p_expiry_date`,
      </if>
      <if test="pIndAddress != null">
        `p_ind_address`,
      </if>
      <if test="pIndEmail != null">
        `p_ind_email`,
      </if>
      <if test="pIndCardUp != null">
        `p_ind_card_up`,
      </if>
      <if test="pIndCardDown != null">
        `p_ind_card_down`,
      </if>
      <if test="eCorporationName != null">
        `e_corporation_name`,
      </if>
      <if test="eCategoryType != null">
        `e_category_type`,
      </if>
      <if test="eCategoryTypeName != null">
        `e_category_type_name`,
      </if>
      <if test="eUnifiedSocialCreditCode != null">
        `e_unified_social_credit_code`,
      </if>
      <if test="eCorEmail != null">
        `e_cor_email`,
      </if>
      <if test="eCorAddress != null">
        `e_cor_address`,
      </if>
      <if test="eProvince != null">
        `e_province`,
      </if>
      <if test="eProvinceName != null">
        `e_province_name`,
      </if>
      <if test="eCity != null">
        `e_city`,
      </if>
      <if test="eCityName != null">
        `e_city_name`,
      </if>
      <if test="eDistrict != null">
        `e_district`,
      </if>
      <if test="eDistrictName != null">
        `e_district_name`,
      </if>
      <if test="eScale != null">
        `e_scale`,
      </if>
      <if test="eScaleName != null">
        `e_scale_name`,
      </if>
      <if test="eBasicAcctNo != null">
        `e_basic_acct_no`,
      </if>
      <if test="eApprovalNo != null">
        `e_approval_no`,
      </if>
      <if test="eAllLicenceIssDate != null">
        `e_all_licence_iss_date`,
      </if>
      <if test="eAllLicenceExpiryDate != null">
        `e_all_licence_expiry_date`,
      </if>
      <if test="eLegalPersonName != null">
        `e_legal_person_name`,
      </if>
      <if test="eLegalCredentialNumber != null">
        `e_legal_credential_number`,
      </if>
      <if test="eLegalPersonIssDate != null">
        `e_legal_person_iss_date`,
      </if>
      <if test="eLegalPersonExpiryDate != null">
        `e_legal_person_expiry_date`,
      </if>
      <if test="eLegalPersonContactNumber != null">
        `e_legal_person_contact_number`,
      </if>
      <if test="eBusinessLicenseImage != null">
        `e_business_license_image`,
      </if>
      <if test="eOpenAccountCertificate != null">
        `e_open_account_certificate`,
      </if>
      <if test="eLegalCardUp != null">
        `e_legal_card_up`,
      </if>
      <if test="eLegalCardDown != null">
        `e_legal_card_down`,
      </if>
    </trim>
  </sql>
  <!--按照主键值进行操作-->
  <sql id="pkWhere">
    WHERE `open_account_id` = #{primaryKey}
  </sql>
  <!--操作条件-->
  <sql id="whereCondition">
    <if test="example != null">
      <trim prefix="WHERE" prefixOverrides="AND|OR">
        <if test="example.openAccountIdNotEquals != null">
          AND `open_account_id` != #{example.openAccountIdNotEquals}
        </if>
        <if test="example.openAccountIdIn != null">
          AND `open_account_id` in (${example.openAccountIdIn})
        </if>
        <if test="example.storeId != null">
          AND `store_id` = #{example.storeId}
        </if>
        <if test="example.userType != null">
          AND `user_type` = #{example.userType}
        </if>
        <if test="example.state != null">
          AND `state` = #{example.state}
        </if>
        <if test="example.stateIn != null">
          AND `state` in (${example.stateIn})
        </if>
        <if test="example.stateNotIn != null">
          AND `state` not in (${example.stateNotIn})
        </if>
        <if test="example.stateNotEquals != null">
          AND `state` != #{example.stateNotEquals}
        </if>
        <if test="example.bindCardSn != null">
          AND `bind_card_sn` = #{example.bindCardSn}
        </if>
        <if test="example.bindCardSnLike != null">
          AND `bind_card_sn` like concat('%',#{example.bindCardSnLike},'%')
        </if>
        <if test="example.imageCollectionSn != null">
          AND `image_collection_sn` = #{example.imageCollectionSn}
        </if>
        <if test="example.imageCollectionSnLike != null">
          AND `image_collection_sn` like concat('%',#{example.imageCollectionSnLike},'%')
        </if>
        <if test="example.openAccountSn != null">
          AND `open_account_sn` = #{example.openAccountSn}
        </if>
        <if test="example.openAccountSnLike != null">
          AND `open_account_sn` like concat('%',#{example.openAccountSnLike},'%')
        </if>
        <if test="example.failReason != null">
          AND `fail_reason` = #{example.failReason}
        </if>
        <if test="example.failReasonLike != null">
          AND `fail_reason` like concat('%',#{example.failReasonLike},'%')
        </if>
        <if test="example.bankAccountName != null">
          AND `bank_account_name` = #{example.bankAccountName}
        </if>
        <if test="example.bankAccountNameLike != null">
          AND `bank_account_name` like concat('%',#{example.bankAccountNameLike},'%')
        </if>
        <if test="example.bankAccountNumber != null">
          AND `bank_account_number` = #{example.bankAccountNumber}
        </if>
        <if test="example.bankId != null">
          AND `bank_id` = #{example.bankId}
        </if>
        <if test="example.bankName != null">
          AND `bank_name` = #{example.bankName}
        </if>
        <if test="example.bankNameLike != null">
          AND `bank_name` like concat('%',#{example.bankNameLike},'%')
        </if>
        <if test="example.credentialNumber != null">
          AND `credential_number` = #{example.credentialNumber}
        </if>
        <if test="example.bankPhoneNumber != null">
          AND `bank_phone_number` = #{example.bankPhoneNumber}
        </if>
        <if test="example.branchName != null">
          AND `branch_name` = #{example.branchName}
        </if>
        <if test="example.branchNameLike != null">
          AND `branch_name` like concat('%',#{example.branchNameLike},'%')
        </if>
        <if test="example.province != null">
          AND `province` = #{example.province}
        </if>
        <if test="example.provinceName != null">
          AND `province_name` = #{example.provinceName}
        </if>
        <if test="example.provinceNameLike != null">
          AND `province_name` like concat('%',#{example.provinceNameLike},'%')
        </if>
        <if test="example.city != null">
          AND `city` = #{example.city}
        </if>
        <if test="example.cityName != null">
          AND `city_name` = #{example.cityName}
        </if>
        <if test="example.cityNameLike != null">
          AND `city_name` like concat('%',#{example.cityNameLike},'%')
        </if>
        <if test="example.pUserName != null">
          AND `p_user_name` = #{example.pUserName}
        </if>
        <if test="example.pUserNameLike != null">
          AND `p_user_name` like concat('%',#{example.pUserNameLike},'%')
        </if>
        <if test="example.pPhoneNumber != null">
          AND `p_phone_number` = #{example.pPhoneNumber}
        </if>
        <if test="example.pCredentialNumber != null">
          AND `p_credential_number` = #{example.pCredentialNumber}
        </if>
        <if test="example.pIssDate != null">
          AND `p_iss_date` = #{example.pIssDate}
        </if>
        <if test="example.pExpiryDate != null">
          AND `p_expiry_date` = #{example.pExpiryDate}
        </if>
        <if test="example.pIndAddress != null">
          AND `p_ind_address` = #{example.pIndAddress}
        </if>
        <if test="example.pIndEmail != null">
          AND `p_ind_email` = #{example.pIndEmail}
        </if>
        <if test="example.pIndCardUp != null">
          AND `p_ind_card_up` = #{example.pIndCardUp}
        </if>
        <if test="example.pIndCardDown != null">
          AND `p_ind_card_down` = #{example.pIndCardDown}
        </if>
        <if test="example.eCorporationName != null">
          AND `e_corporation_name` = #{example.eCorporationName}
        </if>
        <if test="example.eCorporationNameLike != null">
          AND `e_corporation_name` like concat('%',#{example.eCorporationNameLike},'%')
        </if>
        <if test="example.eCategoryType != null">
          AND `e_category_type` = #{example.eCategoryType}
        </if>
        <if test="example.eCategoryTypeName != null">
          AND `e_category_type_name` = #{example.eCategoryTypeName}
        </if>
        <if test="example.eCategoryTypeNameLike != null">
          AND `e_category_type_name` like concat('%',#{example.eCategoryTypeNameLike},'%')
        </if>
        <if test="example.eUnifiedSocialCreditCode != null">
          AND `e_unified_social_credit_code` = #{example.eUnifiedSocialCreditCode}
        </if>
        <if test="example.eCorEmail != null">
          AND `e_cor_email` = #{example.eCorEmail}
        </if>
        <if test="example.eCorAddress != null">
          AND `e_cor_address` = #{example.eCorAddress}
        </if>
        <if test="example.eProvince != null">
          AND `e_province` = #{example.eProvince}
        </if>
        <if test="example.eProvinceName != null">
          AND `e_province_name` = #{example.eProvinceName}
        </if>
        <if test="example.eProvinceNameLike != null">
          AND `e_province_name` like concat('%',#{example.eProvinceNameLike},'%')
        </if>
        <if test="example.eCity != null">
          AND `e_city` = #{example.eCity}
        </if>
        <if test="example.eCityName != null">
          AND `e_city_name` = #{example.eCityName}
        </if>
        <if test="example.eCityNameLike != null">
          AND `e_city_name` like concat('%',#{example.eCityNameLike},'%')
        </if>
        <if test="example.eDistrict != null">
          AND `e_district` = #{example.eDistrict}
        </if>
        <if test="example.eDistrictName != null">
          AND `e_district_name` = #{example.eDistrictName}
        </if>
        <if test="example.eDistrictNameLike != null">
          AND `e_district_name` like concat('%',#{example.eDistrictNameLike},'%')
        </if>
        <if test="example.eScale != null">
          AND `e_scale` = #{example.eScale}
        </if>
        <if test="example.eScaleName != null">
          AND `e_scale_name` = #{example.eScaleName}
        </if>
        <if test="example.eScaleNameLike != null">
          AND `e_scale_name` like concat('%',#{example.eScaleNameLike},'%')
        </if>
        <if test="example.eBasicAcctNo != null">
          AND `e_basic_acct_no` = #{example.eBasicAcctNo}
        </if>
        <if test="example.eApprovalNo != null">
          AND `e_approval_no` = #{example.eApprovalNo}
        </if>
        <if test="example.eAllLicenceIssDate != null">
          AND `e_all_licence_iss_date` = #{example.eAllLicenceIssDate}
        </if>
        <if test="example.eAllLicenceExpiryDate != null">
          AND `e_all_licence_expiry_date` = #{example.eAllLicenceExpiryDate}
        </if>
        <if test="example.eLegalPersonName != null">
          AND `e_legal_person_name` = #{example.eLegalPersonName}
        </if>
        <if test="example.eLegalPersonNameLike != null">
          AND `e_legal_person_name` like concat('%',#{example.eLegalPersonNameLike},'%')
        </if>
        <if test="example.eLegalCredentialNumber != null">
          AND `e_legal_credential_number` = #{example.eLegalCredentialNumber}
        </if>
        <if test="example.eLegalPersonIssDate != null">
          AND `e_legal_person_iss_date` = #{example.eLegalPersonIssDate}
        </if>
        <if test="example.eLegalPersonExpiryDate != null">
          AND `e_legal_person_expiry_date` = #{example.eLegalPersonExpiryDate}
        </if>
        <if test="example.eLegalPersonContactNumber != null">
          AND `e_legal_person_contact_number` = #{example.eLegalPersonContactNumber}
        </if>
        <if test="example.eBusinessLicenseImage != null">
          AND `e_business_license_image` = #{example.eBusinessLicenseImage}
        </if>
        <if test="example.eOpenAccountCertificate != null">
          AND `e_open_account_certificate` = #{example.eOpenAccountCertificate}
        </if>
        <if test="example.eLegalCardUp != null">
          AND `e_legal_card_up` = #{example.eLegalCardUp}
        </if>
        <if test="example.eLegalCardDown != null">
          AND `e_legal_card_down` = #{example.eLegalCardDown}
        </if>
      </trim>
    </if>
  </sql>
  <!--排序条件-->
  <sql id="orderBy">
    ORDER BY `open_account_id` DESC
  </sql>
  <sql id="orderByOther">
    order by ${example.orderBy}
  </sql>
  <!--分组条件-->
  <sql id="groupBy">
    group by ${example.groupBy}
  </sql>
  <!--分页条件-->
  <sql id="limit">
    <if test="size != null and size &gt; 0">
      limit #{startRow},#{size}
    </if>
  </sql>
  <!--查询符合条件的记录数-->
  <select id="countByExample" parameterType="com.slodon.b2b2c.seller.example.StoreOpenAccountExample" resultType="java.lang.Integer">
    SELECT
      COUNT(*)
    FROM `store_open_account`
    <include refid="whereCondition" />
  </select>
  <!--根据主键查询记录-->
  <select id="getByPrimaryKey" resultMap="resultMap">
    SELECT
      *
    FROM `store_open_account`
    <include refid="pkWhere" />
  </select>
  <!--查询符合条件的记录(所有字段)-->
  <select id="listByExample" resultMap="resultMap">
    SELECT
      *
    FROM `store_open_account`
    <include refid="whereCondition" />
    <if test="example.groupBy != null">
      <include refid="groupBy" />
    </if>
    <choose>
      <when test="example.orderBy != null">
        <include refid="orderByOther" />
      </when>
      <otherwise>
        <include refid="orderBy" />
      </otherwise>
    </choose>
  </select>
  <!--分页查询符合条件的记录(所有字段)-->
  <select id="listPageByExample" resultMap="resultMap">
    SELECT
      *
    FROM `store_open_account`
    <include refid="whereCondition" />
    <if test="example.groupBy != null">
      <include refid="groupBy" />
    </if>
    <choose>
      <when test="example.orderBy != null">
        <include refid="orderByOther" />
      </when>
      <otherwise>
        <include refid="orderBy" />
      </otherwise>
    </choose>
    <include refid="limit" />
  </select>
  <!--查询符合条件的记录(指定字段)-->
  <select id="listFieldsByExample" resultMap="resultMap">
    SELECT
      ${fields}
    FROM `store_open_account`
    <include refid="whereCondition" />
    <if test="example.groupBy != null">
      <include refid="groupBy" />
    </if>
    <choose>
      <when test="example.orderBy != null">
        <include refid="orderByOther" />
      </when>
      <otherwise>
        <include refid="orderBy" />
      </otherwise>
    </choose>
  </select>
  <!--分页查询符合条件的记录(指定字段)-->
  <select id="listFieldsPageByExample" resultMap="resultMap">
    SELECT
      ${fields}
    FROM `store_open_account`
    <include refid="whereCondition" />
    <if test="example.groupBy != null">
      <include refid="groupBy" />
    </if>
    <choose>
      <when test="example.orderBy != null">
        <include refid="orderByOther" />
      </when>
      <otherwise>
        <include refid="orderBy" />
      </otherwise>
    </choose>
    <include refid="limit" />
  </select>
  <!--根据条件删除记录，可多条删除-->
  <delete id="deleteByExample">
    DELETE FROM `store_open_account`
    <include refid="whereCondition" />
  </delete>
  <!--根据主键删除记录-->
  <delete id="deleteByPrimaryKey">
    DELETE FROM `store_open_account`
    <include refid="pkWhere" />
  </delete>
  <!--插入一条记录-->
  <insert id="insert" keyColumn="open_account_id" keyProperty="openAccountId" parameterType="com.slodon.b2b2c.seller.pojo.StoreOpenAccount" useGeneratedKeys="true">
    INSERT INTO `store_open_account`(
    <include refid="columns" />
    )
    VALUES(
    <trim suffixOverrides=",">
      <if test="storeId != null">
        #{storeId},
      </if>
      <if test="userType != null">
        #{userType},
      </if>
      <if test="state != null">
        #{state},
      </if>
      <if test="bindCardSn != null">
        #{bindCardSn},
      </if>
      <if test="imageCollectionSn != null">
        #{imageCollectionSn},
      </if>
      <if test="openAccountSn != null">
        #{openAccountSn},
      </if>
      <if test="failReason != null">
        #{failReason},
      </if>
      <if test="bankAccountName != null">
        #{bankAccountName},
      </if>
      <if test="bankAccountNumber != null">
        #{bankAccountNumber},
      </if>
      <if test="bankId != null">
        #{bankId},
      </if>
      <if test="bankName != null">
        #{bankName},
      </if>
      <if test="credentialNumber != null">
        #{credentialNumber},
      </if>
      <if test="bankPhoneNumber != null">
        #{bankPhoneNumber},
      </if>
      <if test="branchName != null">
        #{branchName},
      </if>
      <if test="province != null">
        #{province},
      </if>
      <if test="provinceName != null">
        #{provinceName},
      </if>
      <if test="city != null">
        #{city},
      </if>
      <if test="cityName != null">
        #{cityName},
      </if>
      <if test="pUserName != null">
        #{pUserName},
      </if>
      <if test="pPhoneNumber != null">
        #{pPhoneNumber},
      </if>
      <if test="pCredentialNumber != null">
        #{pCredentialNumber},
      </if>
      <if test="pIssDate != null">
        #{pIssDate},
      </if>
      <if test="pExpiryDate != null">
        #{pExpiryDate},
      </if>
      <if test="pIndAddress != null">
        #{pIndAddress},
      </if>
      <if test="pIndEmail != null">
        #{pIndEmail},
      </if>
      <if test="pIndCardUp != null">
        #{pIndCardUp},
      </if>
      <if test="pIndCardDown != null">
        #{pIndCardDown},
      </if>
      <if test="eCorporationName != null">
        #{eCorporationName},
      </if>
      <if test="eCategoryType != null">
        #{eCategoryType},
      </if>
      <if test="eCategoryTypeName != null">
        #{eCategoryTypeName},
      </if>
      <if test="eUnifiedSocialCreditCode != null">
        #{eUnifiedSocialCreditCode},
      </if>
      <if test="eCorEmail != null">
        #{eCorEmail},
      </if>
      <if test="eCorAddress != null">
        #{eCorAddress},
      </if>
      <if test="eProvince != null">
        #{eProvince},
      </if>
      <if test="eProvinceName != null">
        #{eProvinceName},
      </if>
      <if test="eCity != null">
        #{eCity},
      </if>
      <if test="eCityName != null">
        #{eCityName},
      </if>
      <if test="eDistrict != null">
        #{eDistrict},
      </if>
      <if test="eDistrictName != null">
        #{eDistrictName},
      </if>
      <if test="eScale != null">
        #{eScale},
      </if>
      <if test="eScaleName != null">
        #{eScaleName},
      </if>
      <if test="eBasicAcctNo != null">
        #{eBasicAcctNo},
      </if>
      <if test="eApprovalNo != null">
        #{eApprovalNo},
      </if>
      <if test="eAllLicenceIssDate != null">
        #{eAllLicenceIssDate},
      </if>
      <if test="eAllLicenceExpiryDate != null">
        #{eAllLicenceExpiryDate},
      </if>
      <if test="eLegalPersonName != null">
        #{eLegalPersonName},
      </if>
      <if test="eLegalCredentialNumber != null">
        #{eLegalCredentialNumber},
      </if>
      <if test="eLegalPersonIssDate != null">
        #{eLegalPersonIssDate},
      </if>
      <if test="eLegalPersonExpiryDate != null">
        #{eLegalPersonExpiryDate},
      </if>
      <if test="eLegalPersonContactNumber != null">
        #{eLegalPersonContactNumber},
      </if>
      <if test="eBusinessLicenseImage != null">
        #{eBusinessLicenseImage},
      </if>
      <if test="eOpenAccountCertificate != null">
        #{eOpenAccountCertificate},
      </if>
      <if test="eLegalCardUp != null">
        #{eLegalCardUp},
      </if>
      <if test="eLegalCardDown != null">
        #{eLegalCardDown},
      </if>
    </trim>
    )
  </insert>
  <!--按条件更新记录中不为空的字段-->
  <update id="updateByExampleSelective">
    UPDATE `store_open_account`
    <trim prefix="SET" suffixOverrides=",">
      <if test="record.storeId != null">
        `store_id` = #{record.storeId},
      </if>
      <if test="record.userType != null">
        `user_type` = #{record.userType},
      </if>
      <if test="record.state != null">
        `state` = #{record.state},
      </if>
      <if test="record.bindCardSn != null">
        `bind_card_sn` = #{record.bindCardSn},
      </if>
      <if test="record.imageCollectionSn != null">
        `image_collection_sn` = #{record.imageCollectionSn},
      </if>
      <if test="record.openAccountSn != null">
        `open_account_sn` = #{record.openAccountSn},
      </if>
      <if test="record.failReason != null">
        `fail_reason` = #{record.failReason},
      </if>
      <if test="record.bankAccountName != null">
        `bank_account_name` = #{record.bankAccountName},
      </if>
      <if test="record.bankAccountNumber != null">
        `bank_account_number` = #{record.bankAccountNumber},
      </if>
      <if test="record.bankId != null">
        `bank_id` = #{record.bankId},
      </if>
      <if test="record.bankName != null">
        `bank_name` = #{record.bankName},
      </if>
      <if test="record.credentialNumber != null">
        `credential_number` = #{record.credentialNumber},
      </if>
      <if test="record.bankPhoneNumber != null">
        `bank_phone_number` = #{record.bankPhoneNumber},
      </if>
      <if test="record.branchName != null">
        `branch_name` = #{record.branchName},
      </if>
      <if test="record.province != null">
        `province` = #{record.province},
      </if>
      <if test="record.provinceName != null">
        `province_name` = #{record.provinceName},
      </if>
      <if test="record.city != null">
        `city` = #{record.city},
      </if>
      <if test="record.cityName != null">
        `city_name` = #{record.cityName},
      </if>
      <if test="record.pUserName != null">
        `p_user_name` = #{record.pUserName},
      </if>
      <if test="record.pPhoneNumber != null">
        `p_phone_number` = #{record.pPhoneNumber},
      </if>
      <if test="record.pCredentialNumber != null">
        `p_credential_number` = #{record.pCredentialNumber},
      </if>
      <if test="record.pIssDate != null">
        `p_iss_date` = #{record.pIssDate},
      </if>
      <if test="record.pExpiryDate != null">
        `p_expiry_date` = #{record.pExpiryDate},
      </if>
      <if test="record.pIndAddress != null">
        `p_ind_address` = #{record.pIndAddress},
      </if>
      <if test="record.pIndEmail != null">
        `p_ind_email` = #{record.pIndEmail},
      </if>
      <if test="record.pIndCardUp != null">
        `p_ind_card_up` = #{record.pIndCardUp},
      </if>
      <if test="record.pIndCardDown != null">
        `p_ind_card_down` = #{record.pIndCardDown},
      </if>
      <if test="record.eCorporationName != null">
        `e_corporation_name` = #{record.eCorporationName},
      </if>
      <if test="record.eCategoryType != null">
        `e_category_type` = #{record.eCategoryType},
      </if>
      <if test="record.eCategoryTypeName != null">
        `e_category_type_name` = #{record.eCategoryTypeName},
      </if>
      <if test="record.eUnifiedSocialCreditCode != null">
        `e_unified_social_credit_code` = #{record.eUnifiedSocialCreditCode},
      </if>
      <if test="record.eCorEmail != null">
        `e_cor_email` = #{record.eCorEmail},
      </if>
      <if test="record.eCorAddress != null">
        `e_cor_address` = #{record.eCorAddress},
      </if>
      <if test="record.eProvince != null">
        `e_province` = #{record.eProvince},
      </if>
      <if test="record.eProvinceName != null">
        `e_province_name` = #{record.eProvinceName},
      </if>
      <if test="record.eCity != null">
        `e_city` = #{record.eCity},
      </if>
      <if test="record.eCityName != null">
        `e_city_name` = #{record.eCityName},
      </if>
      <if test="record.eDistrict != null">
        `e_district` = #{record.eDistrict},
      </if>
      <if test="record.eDistrictName != null">
        `e_district_name` = #{record.eDistrictName},
      </if>
      <if test="record.eScale != null">
        `e_scale` = #{record.eScale},
      </if>
      <if test="record.eScaleName != null">
        `e_scale_name` = #{record.eScaleName},
      </if>
      <if test="record.eBasicAcctNo != null">
        `e_basic_acct_no` = #{record.eBasicAcctNo},
      </if>
      <if test="record.eApprovalNo != null">
        `e_approval_no` = #{record.eApprovalNo},
      </if>
      <if test="record.eAllLicenceIssDate != null">
        `e_all_licence_iss_date` = #{record.eAllLicenceIssDate},
      </if>
      <if test="record.eAllLicenceExpiryDate != null">
        `e_all_licence_expiry_date` = #{record.eAllLicenceExpiryDate},
      </if>
      <if test="record.eLegalPersonName != null">
        `e_legal_person_name` = #{record.eLegalPersonName},
      </if>
      <if test="record.eLegalCredentialNumber != null">
        `e_legal_credential_number` = #{record.eLegalCredentialNumber},
      </if>
      <if test="record.eLegalPersonIssDate != null">
        `e_legal_person_iss_date` = #{record.eLegalPersonIssDate},
      </if>
      <if test="record.eLegalPersonExpiryDate != null">
        `e_legal_person_expiry_date` = #{record.eLegalPersonExpiryDate},
      </if>
      <if test="record.eLegalPersonContactNumber != null">
        `e_legal_person_contact_number` = #{record.eLegalPersonContactNumber},
      </if>
      <if test="record.eBusinessLicenseImage != null">
        `e_business_license_image` = #{record.eBusinessLicenseImage},
      </if>
      <if test="record.eOpenAccountCertificate != null">
        `e_open_account_certificate` = #{record.eOpenAccountCertificate},
      </if>
      <if test="record.eLegalCardUp != null">
        `e_legal_card_up` = #{record.eLegalCardUp},
      </if>
      <if test="record.eLegalCardDown != null">
        `e_legal_card_down` = #{record.eLegalCardDown},
      </if>
    </trim>
    <include refid="whereCondition" />
  </update>
  <!--按照主键更新记录中不为空的字段-->
  <update id="updateByPrimaryKeySelective">
    UPDATE `store_open_account`
    <trim prefix="SET" suffixOverrides=",">
      <if test="storeId != null">
        `store_id` = #{storeId},
      </if>
      <if test="userType != null">
        `user_type` = #{userType},
      </if>
      <if test="state != null">
        `state` = #{state},
      </if>
      <if test="bindCardSn != null">
        `bind_card_sn` = #{bindCardSn},
      </if>
      <if test="imageCollectionSn != null">
        `image_collection_sn` = #{imageCollectionSn},
      </if>
      <if test="openAccountSn != null">
        `open_account_sn` = #{openAccountSn},
      </if>
      <if test="failReason != null">
        `fail_reason` = #{failReason},
      </if>
      <if test="bankAccountName != null">
        `bank_account_name` = #{bankAccountName},
      </if>
      <if test="bankAccountNumber != null">
        `bank_account_number` = #{bankAccountNumber},
      </if>
      <if test="bankId != null">
        `bank_id` = #{bankId},
      </if>
      <if test="bankName != null">
        `bank_name` = #{bankName},
      </if>
      <if test="credentialNumber != null">
        `credential_number` = #{credentialNumber},
      </if>
      <if test="bankPhoneNumber != null">
        `bank_phone_number` = #{bankPhoneNumber},
      </if>
      <if test="branchName != null">
        `branch_name` = #{branchName},
      </if>
      <if test="province != null">
        `province` = #{province},
      </if>
      <if test="provinceName != null">
        `province_name` = #{provinceName},
      </if>
      <if test="city != null">
        `city` = #{city},
      </if>
      <if test="cityName != null">
        `city_name` = #{cityName},
      </if>
      <if test="pUserName != null">
        `p_user_name` = #{pUserName},
      </if>
      <if test="pPhoneNumber != null">
        `p_phone_number` = #{pPhoneNumber},
      </if>
      <if test="pCredentialNumber != null">
        `p_credential_number` = #{pCredentialNumber},
      </if>
      <if test="pIssDate != null">
        `p_iss_date` = #{pIssDate},
      </if>
      <if test="pExpiryDate != null">
        `p_expiry_date` = #{pExpiryDate},
      </if>
      <if test="pIndAddress != null">
        `p_ind_address` = #{pIndAddress},
      </if>
      <if test="pIndEmail != null">
        `p_ind_email` = #{pIndEmail},
      </if>
      <if test="pIndCardUp != null">
        `p_ind_card_up` = #{pIndCardUp},
      </if>
      <if test="pIndCardDown != null">
        `p_ind_card_down` = #{pIndCardDown},
      </if>
      <if test="eCorporationName != null">
        `e_corporation_name` = #{eCorporationName},
      </if>
      <if test="eCategoryType != null">
        `e_category_type` = #{eCategoryType},
      </if>
      <if test="eCategoryTypeName != null">
        `e_category_type_name` = #{eCategoryTypeName},
      </if>
      <if test="eUnifiedSocialCreditCode != null">
        `e_unified_social_credit_code` = #{eUnifiedSocialCreditCode},
      </if>
      <if test="eCorEmail != null">
        `e_cor_email` = #{eCorEmail},
      </if>
      <if test="eCorAddress != null">
        `e_cor_address` = #{eCorAddress},
      </if>
      <if test="eProvince != null">
        `e_province` = #{eProvince},
      </if>
      <if test="eProvinceName != null">
        `e_province_name` = #{eProvinceName},
      </if>
      <if test="eCity != null">
        `e_city` = #{eCity},
      </if>
      <if test="eCityName != null">
        `e_city_name` = #{eCityName},
      </if>
      <if test="eDistrict != null">
        `e_district` = #{eDistrict},
      </if>
      <if test="eDistrictName != null">
        `e_district_name` = #{eDistrictName},
      </if>
      <if test="eScale != null">
        `e_scale` = #{eScale},
      </if>
      <if test="eScaleName != null">
        `e_scale_name` = #{eScaleName},
      </if>
      <if test="eBasicAcctNo != null">
        `e_basic_acct_no` = #{eBasicAcctNo},
      </if>
      <if test="eApprovalNo != null">
        `e_approval_no` = #{eApprovalNo},
      </if>
      <if test="eAllLicenceIssDate != null">
        `e_all_licence_iss_date` = #{eAllLicenceIssDate},
      </if>
      <if test="eAllLicenceExpiryDate != null">
        `e_all_licence_expiry_date` = #{eAllLicenceExpiryDate},
      </if>
      <if test="eLegalPersonName != null">
        `e_legal_person_name` = #{eLegalPersonName},
      </if>
      <if test="eLegalCredentialNumber != null">
        `e_legal_credential_number` = #{eLegalCredentialNumber},
      </if>
      <if test="eLegalPersonIssDate != null">
        `e_legal_person_iss_date` = #{eLegalPersonIssDate},
      </if>
      <if test="eLegalPersonExpiryDate != null">
        `e_legal_person_expiry_date` = #{eLegalPersonExpiryDate},
      </if>
      <if test="eLegalPersonContactNumber != null">
        `e_legal_person_contact_number` = #{eLegalPersonContactNumber},
      </if>
      <if test="eBusinessLicenseImage != null">
        `e_business_license_image` = #{eBusinessLicenseImage},
      </if>
      <if test="eOpenAccountCertificate != null">
        `e_open_account_certificate` = #{eOpenAccountCertificate},
      </if>
      <if test="eLegalCardUp != null">
        `e_legal_card_up` = #{eLegalCardUp},
      </if>
      <if test="eLegalCardDown != null">
        `e_legal_card_down` = #{eLegalCardDown},
      </if>
    </trim>
    WHERE `open_account_id` = #{openAccountId}
  </update>
</mapper>