oracle mybatis批量插入,无匹配找默认
2024-08-27 13:36:07
批量插入
<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>
最新文章
- 让ecshop用户登录评价以可择匿名评价
- skinned mesh 蜘蛛样
- 【暑假】[实用数据结构]前缀树 Trie
- 【现代程序设计】【homework-03】【11061027】
- java Map实现的cache manager
- 简单说pyglet.event
- Java Map 迭代
- samba server 设置
- Java计算两个程序运行时间
- idea导出war包
- img标签实现和背景图一样的显示效果——object-fit和object-positon
- JS基础:this的指向以及call、apply的作用
- 你不知道的JavaScript--Item16 for 循环和for...in 循环的那点事儿
- frost_vex_01
- Django学习笔记之数据库-模型的操作
- 设计模式---对象创建模式之抽象工厂模式(Abstract Factory)
- 【C++ STL】Set和Multiset
- 003.NFS配置实例
- Linux内核分析实验八------理解进程调度时机跟踪分析进程调度与
- 84.VMware Tools安装——设置共享文件