一、 插入语句
<!-- 动态sql插入 -->
<sql id="key">
<trim suffixOverrides=",">
<if test="userName != null and userName != ''">
YHM,
</if>
<if test="name != null and name != ''">
XM,
</if>
<if test="sex != null and sex != ''">
XB,
</if>
<if test="phone != null">
LXDH,
</if>
<if test="mobile != null">
SJH,
</if>
<if test="post != null and post != ''">
GW,
</if>
RKSJ,
<if test="description != null and description != ''">
BZ
</if>
</trim>
</sql>
<sql id="value">
<trim suffixOverrides=",">
<if test="userName != null and userName != ''">
#{userName},
</if>
<if test="name != null and name != ''">
#{name},
</if>
<if test="sex != null and sex != ''">
#{sex},
</if>
<if test="phone != null">
#{phone},
</if>
<if test="mobile != null">
#{mobile},
</if>
<if test="post != null and post != ''">
#{post},
</if>
sysdate,
<if test="description != null and description != ''">
#{description}
</if>
</trim>
</sql>
<!-- 添加值班人员信息 -->
<insert id="addDutyOperator" parameterType="com.creatunion.satellite.entity.DutyOperator">
insert into "KX00".KX00_ZBGL_ZBYXX (XH, <include refid="key"/> )
values(KX00.S_KX00_ZBGL_ZBYXX.NEXTVAL, <include refid="value"/> )
</insert>