<?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.ozs.base.mapper.BaseExpertMapper">
    <resultMap type="com.ozs.base.domain.BaseExpert" id="BaseExpertResult">
        <id property="id" column="id"/>
        <result property="expertName" column="expert_name"/>
        <result property="expertGender" column="expert_gender"/>
        <result property="expertDateBirth" column="expert_date_birth"/>
        <result property="expertTel" column="expert_tel"/>
        <result property="majorType" column="major_type"/>
        <result property="unitInformation" column="unit_information"/>
        <result property="majorGrade" column="major_grade"/>
        <result property="varietyPurchase" column="variety_purchase"/>
        <result property="professionalTitle" column="professional_title"/>
        <result property="status" column="status"/>
    </resultMap>

    <insert id="insertExpert" parameterType="com.ozs.base.domain.BaseExpert">
        insert into base_expert (
        <if test="expertName != null and expertName != '' ">
            expert_name,
        </if>
        <if test="expertGender != null and expertGender != '' ">
            expert_gender,
        </if>
        <if test="expertDateBirth != null and expertDateBirth != '' ">
            expert_date_birth,
        </if>
        <if test="expertTel != null and expertTel != '' ">
            expert_tel,
        </if>
        <if test="majorType != null and majorType != ''">
            major_type,
        </if>
        <if test="unitInformation != null and unitInformation != ''">
            unit_information,
        </if>
        <if test="majorGrade != null and majorGrade != '' ">
            major_grade,
        </if>
        <if test="varietyPurchase != null and varietyPurchase != '' ">
            variety_purchase,
        </if>
        <if test="professionalTitle != null and professionalTitle != ''">
            professional_title,
        </if>
        <if test="status != null and status != ''">
            status
        </if>
        ) values (
        <if test="expertName != null and expertName != ''">
            #{expertName},
        </if>
        <if test="expertGender != null and expertGender != ''">
            #{expertGender},
        </if>
        <if test="expertDateBirth != null and expertDateBirth != ''">
            #{expertDateBirth},
        </if>
        <if test="expertTel != null and expertTel != ''">
            #{expertTel},
        </if>
        <if test="majorType != null and majorType != ''">
            #{majorType},
        </if>
        <if test="unitInformation != null and unitInformation != ''">
            #{unitInformation},
        </if>
        <if test="majorGrade != null and majorGrade != ''">
            #{majorGrade},
        </if>
        <if test="varietyPurchase != null and varietyPurchase != ''">
            #{varietyPurchase},
        </if>
        <if test="professionalTitle != null and professionalTitle != ''">
            #{professionalTitle},
        </if>
        <if test="status != null and status != ''">
            #{status}
        </if>
        )
    </insert>

</mapper>