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

it2026-04-24  6

批量插入<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>

转载于:https://www.cnblogs.com/sx2zx/p/9590748.html

最新回复(0)