<?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.yd.dal.mapper.customer.AclPractitionerHiringBasicInfoMapper">
  <resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclPractitionerHiringBasicInfo">
    <!--@mbg.generated-->
    <!--@Table ag_acl_practitioner_hiring_basic_info-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="approve_status" jdbcType="VARCHAR" property="approveStatus" />
    <result column="practitioner_potential_id" jdbcType="BIGINT" property="practitionerPotentialId" />
    <result column="invitee_practitioner_id" jdbcType="BIGINT" property="inviteePractitionerId" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="mobile_no" jdbcType="VARCHAR" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
    <result column="id_type_id" jdbcType="BIGINT" property="idTypeId" />
    <result column="id_type" jdbcType="VARCHAR" property="idType" />
    <result column="id_no" jdbcType="VARCHAR" property="idNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
    <result column="gender" jdbcType="INTEGER" property="gender" />
    <result column="practitioner_birthdate" jdbcType="VARCHAR" property="practitionerBirthdate" />
    <result column="province_id" jdbcType="BIGINT" property="provinceId" />
    <result column="province_name" jdbcType="VARCHAR" property="provinceName" />
    <result column="city_id" jdbcType="BIGINT" property="cityId" />
    <result column="city_name" jdbcType="VARCHAR" property="cityName" />
    <result column="political_outlook" jdbcType="VARCHAR" property="politicalOutlook" />
    <result column="resident_address" jdbcType="LONGVARCHAR" property="residentAddress" />
    <result column="wechat_id" jdbcType="VARCHAR" property="wechatId" />
    <result column="wechat_QRcode_oss_path" jdbcType="VARCHAR" property="wechatQRcodeOssPath" />
    <result column="email" jdbcType="VARCHAR" property="email" />
    <result column="personer_picture_oss_path" jdbcType="VARCHAR" property="personerPictureOssPath" />
    <result column="payroll_oss_path" jdbcType="VARCHAR" property="payrollOssPath" />
    <result column="id_front_page_oss_path" jdbcType="VARCHAR" property="idFrontPageOssPath" />
    <result column="id_back_page_oss_path" jdbcType="VARCHAR" property="idBackPageOssPath" />
    <result column="last_graduate_code" jdbcType="VARCHAR" property="lastGraduateCode" />
    <result column="last_graduate_grade" jdbcType="VARCHAR" property="lastGraduateGrade" />
    <result column="last_graduate_school" jdbcType="VARCHAR" property="lastGraduateSchool" />
    <result column="last_graduate_certification_oss_path" jdbcType="VARCHAR" property="lastGraduateCertificationOssPath" />
    <result column="bank_account_opening" jdbcType="VARCHAR" property="bankAccountOpening" />
    <result column="bank_account_id" jdbcType="VARCHAR" property="bankAccountId" />
    <result column="personal_sign_oss_path" jdbcType="VARCHAR" property="personalSignOssPath" />
    <result column="is_active" jdbcType="INTEGER" property="isActive" />
    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
    <result column="created_by" jdbcType="BIGINT" property="createdBy" />
    <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
    <result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, practitioner_potential_id, invitee_practitioner_id, `name`, mobile_no, id_type_id, 
    id_type, id_no, gender, practitioner_birthdate, province_id, province_name, city_id, 
    city_name, political_outlook, resident_address, wechat_id, wechat_QRcode_oss_path, email, personer_picture_oss_path, payroll_oss_path, id_front_page_oss_path,
    id_back_page_oss_path, last_graduate_code, last_graduate_grade, last_graduate_school, last_graduate_certification_oss_path,
    bank_account_opening, bank_account_id, personal_sign_oss_path, is_active, created_at, 
    created_by, updated_at, updated_by, approve_status
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select 
    <include refid="Base_Column_List" />
    from ag_acl_practitioner_hiring_basic_info
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from ag_acl_practitioner_hiring_basic_info
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerHiringBasicInfo" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into ag_acl_practitioner_hiring_basic_info (practitioner_potential_id, invitee_practitioner_id, 
      `name`, mobile_no, id_type_id, 
      id_type, id_no, gender, 
      practitioner_birthdate, province_id, province_name, 
      city_id, city_name, resident_address, 
      wechat_id, email, personer_picture_oss_path, 
      id_front_page_oss_path, id_back_page_oss_path, 
      last_graduate_grade, last_graduate_school, 
      last_graduate_certification_oss_path, bank_account_opening, 
      bank_account_id, personal_sign_oss_path, is_active, 
      created_at, created_by, updated_at, 
      updated_by)
    values (#{practitionerPotentialId,jdbcType=BIGINT}, #{inviteePractitionerId,jdbcType=BIGINT}, 
      #{name,jdbcType=VARCHAR}, #{mobileNo,jdbcType=VARCHAR}, #{idTypeId,jdbcType=BIGINT}, 
      #{idType,jdbcType=VARCHAR}, #{idNo,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, 
      #{practitionerBirthdate,jdbcType=VARCHAR}, #{provinceId,jdbcType=BIGINT}, #{provinceName,jdbcType=VARCHAR},
      #{cityId,jdbcType=BIGINT}, #{cityName,jdbcType=VARCHAR}, #{residentAddress,jdbcType=LONGVARCHAR}, 
      #{wechatId,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{personerPictureOssPath,jdbcType=VARCHAR}, 
      #{idFrontPageOssPath,jdbcType=VARCHAR}, #{idBackPageOssPath,jdbcType=VARCHAR}, 
      #{lastGraduateGrade,jdbcType=VARCHAR}, #{lastGraduateSchool,jdbcType=VARCHAR}, 
      #{lastGraduateCertificationOssPath,jdbcType=VARCHAR}, #{bankAccountOpening,jdbcType=VARCHAR}, 
      #{bankAccountId,jdbcType=VARCHAR}, #{personalSignOssPath,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER}, 
      #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, 
      #{updatedBy,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerHiringBasicInfo" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into ag_acl_practitioner_hiring_basic_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="practitionerPotentialId != null">
        practitioner_potential_id,
      </if>
      <if test="inviteePractitionerId != null">
        invitee_practitioner_id,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="mobileNo != null">
        mobile_no,
      </if>
      <if test="idTypeId != null">
        id_type_id,
      </if>
      <if test="idType != null">
        id_type,
      </if>
      <if test="idNo != null">
        id_no,
      </if>
      <if test="gender != null">
        gender,
      </if>
      <if test="practitionerBirthdate != null">
        practitioner_birthdate,
      </if>
      <if test="provinceId != null">
        province_id,
      </if>
      <if test="provinceName != null">
        province_name,
      </if>
      <if test="cityId != null">
        city_id,
      </if>
      <if test="cityName != null">
        city_name,
      </if>
      <if test="residentAddress != null">
        resident_address,
      </if>
      <if test="wechatId != null">
        wechat_id,
      </if>
      <if test="email != null">
        email,
      </if>
      <if test="personerPictureOssPath != null">
        personer_picture_oss_path,
      </if>
      <if test="idFrontPageOssPath != null">
        id_front_page_oss_path,
      </if>
      <if test="idBackPageOssPath != null">
        id_back_page_oss_path,
      </if>
      <if test="lastGraduateGrade != null">
        last_graduate_grade,
      </if>
      <if test="lastGraduateSchool != null">
        last_graduate_school,
      </if>
      <if test="lastGraduateCertificationOssPath != null">
        last_graduate_certification_oss_path,
      </if>
      <if test="bankAccountOpening != null">
        bank_account_opening,
      </if>
      <if test="bankAccountId != null">
        bank_account_id,
      </if>
      <if test="personalSignOssPath != null">
        personal_sign_oss_path,
      </if>
      <if test="isActive != null">
        is_active,
      </if>
      <if test="createdAt != null">
        created_at,
      </if>
      <if test="createdBy != null">
        created_by,
      </if>
      <if test="updatedAt != null">
        updated_at,
      </if>
      <if test="updatedBy != null">
        updated_by,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="practitionerPotentialId != null">
        #{practitionerPotentialId,jdbcType=BIGINT},
      </if>
      <if test="inviteePractitionerId != null">
        #{inviteePractitionerId,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="mobileNo != null">
        #{mobileNo,jdbcType=VARCHAR},
      </if>
      <if test="idTypeId != null">
        #{idTypeId,jdbcType=BIGINT},
      </if>
      <if test="idType != null">
        #{idType,jdbcType=VARCHAR},
      </if>
      <if test="idNo != null">
        #{idNo,jdbcType=VARCHAR},
      </if>
      <if test="gender != null">
        #{gender,jdbcType=INTEGER},
      </if>
      <if test="practitionerBirthdate != null">
        #{practitionerBirthdate,jdbcType=VARCHAR},
      </if>
      <if test="provinceId != null">
        #{provinceId,jdbcType=BIGINT},
      </if>
      <if test="provinceName != null">
        #{provinceName,jdbcType=VARCHAR},
      </if>
      <if test="cityId != null">
        #{cityId,jdbcType=BIGINT},
      </if>
      <if test="cityName != null">
        #{cityName,jdbcType=VARCHAR},
      </if>
      <if test="residentAddress != null">
        #{residentAddress,jdbcType=LONGVARCHAR},
      </if>
      <if test="wechatId != null">
        #{wechatId,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        #{email,jdbcType=VARCHAR},
      </if>
      <if test="personerPictureOssPath != null">
        #{personerPictureOssPath,jdbcType=VARCHAR},
      </if>
      <if test="idFrontPageOssPath != null">
        #{idFrontPageOssPath,jdbcType=VARCHAR},
      </if>
      <if test="idBackPageOssPath != null">
        #{idBackPageOssPath,jdbcType=VARCHAR},
      </if>
      <if test="lastGraduateGrade != null">
        #{lastGraduateGrade,jdbcType=VARCHAR},
      </if>
      <if test="lastGraduateSchool != null">
        #{lastGraduateSchool,jdbcType=VARCHAR},
      </if>
      <if test="lastGraduateCertificationOssPath != null">
        #{lastGraduateCertificationOssPath,jdbcType=VARCHAR},
      </if>
      <if test="bankAccountOpening != null">
        #{bankAccountOpening,jdbcType=VARCHAR},
      </if>
      <if test="bankAccountId != null">
        #{bankAccountId,jdbcType=VARCHAR},
      </if>
      <if test="personalSignOssPath != null">
        #{personalSignOssPath,jdbcType=VARCHAR},
      </if>
      <if test="isActive != null">
        #{isActive,jdbcType=INTEGER},
      </if>
      <if test="createdAt != null">
        #{createdAt,jdbcType=TIMESTAMP},
      </if>
      <if test="createdBy != null">
        #{createdBy,jdbcType=BIGINT},
      </if>
      <if test="updatedAt != null">
        #{updatedAt,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedBy != null">
        #{updatedBy,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerHiringBasicInfo">
    <!--@mbg.generated-->
    update ag_acl_practitioner_hiring_basic_info
    <set>
      <if test="practitionerPotentialId != null">
        practitioner_potential_id = #{practitionerPotentialId,jdbcType=BIGINT},
      </if>
      <if test="inviteePractitionerId != null">
        invitee_practitioner_id = #{inviteePractitionerId,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="mobileNo != null">
        mobile_no = #{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
      </if>
      <if test="idTypeId != null">
        id_type_id = #{idTypeId,jdbcType=BIGINT},
      </if>
      <if test="idType != null">
        id_type = #{idType,jdbcType=VARCHAR},
      </if>
      <if test="idNo != null">
        id_no = #{idNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
      </if>
      <if test="gender != null">
        gender = #{gender,jdbcType=INTEGER},
      </if>
      <if test="practitionerBirthdate != null">
        practitioner_birthdate = #{practitionerBirthdate,jdbcType=VARCHAR},
      </if>
      <if test="provinceId != null">
        province_id = #{provinceId,jdbcType=BIGINT},
      </if>
      <if test="provinceName != null">
        province_name = #{provinceName,jdbcType=VARCHAR},
      </if>
      <if test="cityId != null">
        city_id = #{cityId,jdbcType=BIGINT},
      </if>
      <if test="cityName != null">
        city_name = #{cityName,jdbcType=VARCHAR},
      </if>
      <if test="politicalOutlook != null">
        political_outlook = #{politicalOutlook,jdbcType=VARCHAR},
      </if>
      <if test="residentAddress != null">
        resident_address = #{residentAddress,jdbcType=LONGVARCHAR},
      </if>
      <if test="wechatId != null">
        wechat_id = #{wechatId,jdbcType=VARCHAR},
      </if>
      <if test="wechatQRcodeOssPath != null">
        wechat_QRcode_oss_path = #{wechatQRcodeOssPath,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        email = #{email,jdbcType=VARCHAR},
      </if>
      <if test="personerPictureOssPath != null">
        personer_picture_oss_path = #{personerPictureOssPath,jdbcType=VARCHAR},
      </if>
      <if test="payrollOssPath != null">
        payroll_oss_path = #{payrollOssPath,jdbcType=VARCHAR},
      </if>
      <if test="idFrontPageOssPath != null">
        id_front_page_oss_path = #{idFrontPageOssPath,jdbcType=VARCHAR},
      </if>
      <if test="idBackPageOssPath != null">
        id_back_page_oss_path = #{idBackPageOssPath,jdbcType=VARCHAR},
      </if>
      <if test="lastGraduateCode != null">
        last_graduate_code = #{lastGraduateCode,jdbcType=VARCHAR},
      </if>
      <if test="lastGraduateGrade != null">
        last_graduate_grade = #{lastGraduateGrade,jdbcType=VARCHAR},
      </if>
      <if test="lastGraduateSchool != null">
        last_graduate_school = #{lastGraduateSchool,jdbcType=VARCHAR},
      </if>
      <if test="lastGraduateCertificationOssPath != null">
        last_graduate_certification_oss_path = #{lastGraduateCertificationOssPath,jdbcType=VARCHAR},
      </if>
      <if test="bankAccountOpening != null">
        bank_account_opening = #{bankAccountOpening,jdbcType=VARCHAR},
      </if>
      <if test="bankAccountId != null">
        bank_account_id = #{bankAccountId,jdbcType=VARCHAR},
      </if>
      <if test="personalSignOssPath != null">
        personal_sign_oss_path = #{personalSignOssPath,jdbcType=VARCHAR},
      </if>
      <if test="approveStatus != null">
        approve_status = #{approveStatus,jdbcType=VARCHAR},
      </if>
      <if test="isActive != null">
        is_active = #{isActive,jdbcType=INTEGER},
      </if>
      <if test="createdAt != null">
        created_at = #{createdAt,jdbcType=TIMESTAMP},
      </if>
      <if test="createdBy != null">
        created_by = #{createdBy,jdbcType=BIGINT},
      </if>
      <if test="updatedAt != null">
        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
      </if>
      <if test="updatedBy != null">
        updated_by = #{updatedBy,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclPractitionerHiringBasicInfo">
    <!--@mbg.generated-->
    update ag_acl_practitioner_hiring_basic_info
    set practitioner_potential_id = #{practitionerPotentialId,jdbcType=BIGINT},
      invitee_practitioner_id = #{inviteePractitionerId,jdbcType=BIGINT},
      `name` = #{name,jdbcType=VARCHAR},
      mobile_no = #{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
      id_type_id = #{idTypeId,jdbcType=BIGINT},
      id_type = #{idType,jdbcType=VARCHAR},
      id_no = #{idNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
      gender = #{gender,jdbcType=INTEGER},
      practitioner_birthdate = #{practitionerBirthdate,jdbcType=VARCHAR},
      province_id = #{provinceId,jdbcType=BIGINT},
      province_name = #{provinceName,jdbcType=VARCHAR},
      city_id = #{cityId,jdbcType=BIGINT},
      city_name = #{cityName,jdbcType=VARCHAR},
      resident_address = #{residentAddress,jdbcType=LONGVARCHAR},
      wechat_id = #{wechatId,jdbcType=VARCHAR},
      email = #{email,jdbcType=VARCHAR},
      personer_picture_oss_path = #{personerPictureOssPath,jdbcType=VARCHAR},
      payroll_oss_path = #{payrollOssPath,jdbcType=VARCHAR},
      id_front_page_oss_path = #{idFrontPageOssPath,jdbcType=VARCHAR},
      id_back_page_oss_path = #{idBackPageOssPath,jdbcType=VARCHAR},
      last_graduate_code = #{lastGraduateCode,jdbcType=VARCHAR},
      last_graduate_grade = #{lastGraduateGrade,jdbcType=VARCHAR},
      last_graduate_school = #{lastGraduateSchool,jdbcType=VARCHAR},
      last_graduate_certification_oss_path = #{lastGraduateCertificationOssPath,jdbcType=VARCHAR},
      bank_account_opening = #{bankAccountOpening,jdbcType=VARCHAR},
      bank_account_id = #{bankAccountId,jdbcType=VARCHAR},
      personal_sign_oss_path = #{personalSignOssPath,jdbcType=VARCHAR},
      is_active = #{isActive,jdbcType=INTEGER},
      created_at = #{createdAt,jdbcType=TIMESTAMP},
      created_by = #{createdBy,jdbcType=BIGINT},
      updated_at = #{updatedAt,jdbcType=TIMESTAMP},
      updated_by = #{updatedBy,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateBatch" parameterType="java.util.List">
    <!--@mbg.generated-->
    update ag_acl_practitioner_hiring_basic_info
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="practitioner_potential_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerPotentialId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="invitee_practitioner_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.inviteePractitionerId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="`name` = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.name,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="mobile_no = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.mobileNo,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="id_type_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.idTypeId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="id_type = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.idType,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="id_no = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.idNo,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="gender = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.gender,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="practitioner_birthdate = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerBirthdate,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="province_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.provinceId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="province_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.provinceName,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="city_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.cityId,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="city_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.cityName,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="resident_address = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.residentAddress,jdbcType=LONGVARCHAR}
        </foreach>
      </trim>
      <trim prefix="wechat_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.wechatId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="email = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.email,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="personer_picture_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.personerPictureOssPath,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="id_front_page_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.idFrontPageOssPath,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="id_back_page_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.idBackPageOssPath,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="last_graduate_grade = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.lastGraduateGrade,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="last_graduate_school = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.lastGraduateSchool,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="last_graduate_certification_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.lastGraduateCertificationOssPath,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="bank_account_opening = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.bankAccountOpening,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="bank_account_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.bankAccountId,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="personal_sign_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.personalSignOssPath,jdbcType=VARCHAR}
        </foreach>
      </trim>
      <trim prefix="is_active = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
        </foreach>
      </trim>
      <trim prefix="created_at = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="created_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
        </foreach>
      </trim>
      <trim prefix="updated_at = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
        </foreach>
      </trim>
      <trim prefix="updated_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=BIGINT}
    </foreach>
  </update>
  <update id="updateBatchSelective" parameterType="java.util.List">
    <!--@mbg.generated-->
    update ag_acl_practitioner_hiring_basic_info
    <trim prefix="set" suffixOverrides=",">
      <trim prefix="practitioner_potential_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.practitionerPotentialId != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerPotentialId,jdbcType=BIGINT}
          </if>
        </foreach>
      </trim>
      <trim prefix="invitee_practitioner_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.inviteePractitionerId != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.inviteePractitionerId,jdbcType=BIGINT}
          </if>
        </foreach>
      </trim>
      <trim prefix="`name` = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.name != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.name,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="mobile_no = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.mobileNo != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.mobileNo,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="id_type_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.idTypeId != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.idTypeId,jdbcType=BIGINT}
          </if>
        </foreach>
      </trim>
      <trim prefix="id_type = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.idType != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.idType,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="id_no = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.idNo != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.idNo,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="gender = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.gender != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.gender,jdbcType=INTEGER}
          </if>
        </foreach>
      </trim>
      <trim prefix="practitioner_birthdate = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.practitionerBirthdate != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerBirthdate,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="province_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.provinceId != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.provinceId,jdbcType=BIGINT}
          </if>
        </foreach>
      </trim>
      <trim prefix="province_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.provinceName != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.provinceName,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="city_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.cityId != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.cityId,jdbcType=BIGINT}
          </if>
        </foreach>
      </trim>
      <trim prefix="city_name = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.cityName != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.cityName,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="resident_address = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.residentAddress != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.residentAddress,jdbcType=LONGVARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="wechat_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.wechatId != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.wechatId,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="email = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.email != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.email,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="personer_picture_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.personerPictureOssPath != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.personerPictureOssPath,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="id_front_page_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.idFrontPageOssPath != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.idFrontPageOssPath,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="id_back_page_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.idBackPageOssPath != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.idBackPageOssPath,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="last_graduate_grade = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.lastGraduateGrade != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.lastGraduateGrade,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="last_graduate_school = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.lastGraduateSchool != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.lastGraduateSchool,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="last_graduate_certification_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.lastGraduateCertificationOssPath != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.lastGraduateCertificationOssPath,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="bank_account_opening = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.bankAccountOpening != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.bankAccountOpening,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="bank_account_id = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.bankAccountId != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.bankAccountId,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="personal_sign_oss_path = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.personalSignOssPath != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.personalSignOssPath,jdbcType=VARCHAR}
          </if>
        </foreach>
      </trim>
      <trim prefix="is_active = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.isActive != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
          </if>
        </foreach>
      </trim>
      <trim prefix="created_at = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.createdAt != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="created_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.createdBy != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
          </if>
        </foreach>
      </trim>
      <trim prefix="updated_at = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.updatedAt != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
          </if>
        </foreach>
      </trim>
      <trim prefix="updated_by = case" suffix="end,">
        <foreach collection="list" index="index" item="item">
          <if test="item.updatedBy != null">
            when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
          </if>
        </foreach>
      </trim>
    </trim>
    where id in
    <foreach close=")" collection="list" item="item" open="(" separator=", ">
      #{item.id,jdbcType=BIGINT}
    </foreach>
  </update>
  <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into ag_acl_practitioner_hiring_basic_info
    (practitioner_potential_id, invitee_practitioner_id, `name`, mobile_no, id_type_id, 
      id_type, id_no, gender, practitioner_birthdate, province_id, province_name, city_id, 
      city_name, resident_address, wechat_id, email, personer_picture_oss_path, id_front_page_oss_path, 
      id_back_page_oss_path, last_graduate_grade, last_graduate_school, last_graduate_certification_oss_path, 
      bank_account_opening, bank_account_id, personal_sign_oss_path, is_active, created_at, 
      created_by, updated_at, updated_by)
    values
    <foreach collection="list" item="item" separator=",">
      (#{item.practitionerPotentialId,jdbcType=BIGINT}, #{item.inviteePractitionerId,jdbcType=BIGINT}, 
        #{item.name,jdbcType=VARCHAR}, #{item.mobileNo,jdbcType=VARCHAR}, #{item.idTypeId,jdbcType=BIGINT}, 
        #{item.idType,jdbcType=VARCHAR}, #{item.idNo,jdbcType=VARCHAR}, #{item.gender,jdbcType=INTEGER}, 
        #{item.practitionerBirthdate,jdbcType=VARCHAR}, #{item.provinceId,jdbcType=BIGINT},
        #{item.provinceName,jdbcType=VARCHAR}, #{item.cityId,jdbcType=BIGINT}, #{item.cityName,jdbcType=VARCHAR}, 
        #{item.residentAddress,jdbcType=LONGVARCHAR}, #{item.wechatId,jdbcType=VARCHAR}, 
        #{item.email,jdbcType=VARCHAR}, #{item.personerPictureOssPath,jdbcType=VARCHAR}, 
        #{item.idFrontPageOssPath,jdbcType=VARCHAR}, #{item.idBackPageOssPath,jdbcType=VARCHAR}, 
        #{item.lastGraduateGrade,jdbcType=VARCHAR}, #{item.lastGraduateSchool,jdbcType=VARCHAR}, 
        #{item.lastGraduateCertificationOssPath,jdbcType=VARCHAR}, #{item.bankAccountOpening,jdbcType=VARCHAR}, 
        #{item.bankAccountId,jdbcType=VARCHAR}, #{item.personalSignOssPath,jdbcType=VARCHAR}, 
        #{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT}, 
        #{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT})
    </foreach>
  </insert>

  <update id="updateByPractitionerPotentialId">
    update ag_acl_practitioner_hiring_basic_info
    set
      invitee_practitioner_id = #{inviteePractitionerId,jdbcType=BIGINT},
      `name` = #{name,jdbcType=VARCHAR},
      mobile_no = #{mobileNo,jdbcType=VARCHAR},
      id_type_id = #{idTypeId,jdbcType=BIGINT},
      id_type = #{idType,jdbcType=VARCHAR},
      id_no = #{idNo,jdbcType=VARCHAR},
      gender = #{gender,jdbcType=INTEGER},
      practitioner_birthdate = #{practitionerBirthdate,jdbcType=VARCHAR},
      province_id = #{provinceId,jdbcType=BIGINT},
      province_name = #{provinceName,jdbcType=VARCHAR},
      city_id = #{cityId,jdbcType=BIGINT},
      city_name = #{cityName,jdbcType=VARCHAR},
      resident_address = #{residentAddress,jdbcType=LONGVARCHAR},
      wechat_id = #{wechatId,jdbcType=VARCHAR},
      email = #{email,jdbcType=VARCHAR},

      is_active = #{isActive,jdbcType=INTEGER},
      created_at = #{createdAt,jdbcType=TIMESTAMP},
      created_by = #{createdBy,jdbcType=BIGINT},
      updated_at = #{updatedAt,jdbcType=TIMESTAMP},
      updated_by = #{updatedBy,jdbcType=BIGINT}
    where practitioner_potential_id = #{practitionerPotentialId,jdbcType=BIGINT}
  </update>

  <update id="changeBasicinfoUpdatable">
      update ag_acl_practitioner_hiring_basic_info set approve_status = null where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>