oracle mybatis批量插入,无匹配找默认

批量插入
<insert id="insertIndi" parameterType="java.util.HashMap" useGeneratedKeys="false">
<foreach collection="datalist" item="item" index="index" open="begin" close="; end;" separator=";">
insert into fpmv_indi_exectemp(${lineColumn}) values
<foreach collection="item.values" index="key" item="_value" open="(" close=")" separator=",">
#{_value}
</foreach>
</foreach>
</insert>
查询无匹配找默认
<select id="getIndiRefList" parameterType="java.util.HashMap"  resultType="java.util.HashMap">
select * from T_FPDICTYPE where govid = '0' and govyear = '0' and not exists(
select 1 from t_fpdictype where 1 = 1
<if test="year != null">
and trim(govyear) = #{year,jdbcType=VARCHAR}
</if>
<if test = "province != null">
and trim(govid) = #{province,jdbcType=VARCHAR}
</if>
)
union (
select * from t_fpdictype where 1 = 1
<if test="year != null">
and trim(govyear) = #{year,jdbcType=VARCHAR}
</if>
<if test = "province != null">
and trim(govid) = #{province,jdbcType=VARCHAR}
</if>
) </select>
上一篇:qt 使用qtxlsx 读写excel


下一篇:$POST 、$HTTP_RAW_POST_DATA、php://input三者之间的区别