mybatis接口的xml常用配置
2016-06-13 14:08
671 查看
接口
List<String> selectStaffNumByKey(@Param("key") List<String> key, @Param("effDt") Date effDt,
@Param("expDt") Date expDt);
接口对应xml配置
<select id="selectStaffNumByKey" resultType="String" >
select
STAFF_NUM
from CREW_BASE_V
where BASE IN
<foreach collection="key" item="item" index="index" open="("
separator="," close=")">#{item}</foreach>
and EFF_DT < #{expDt,jdbcType=TIMESTAMP}
and (EXP_DT IS NULL OR EXP_DT > #{effDt,jdbcType=TIMESTAMP})
</select>
时间比较操作符< 小于,>大于,和IN的集合表示
List<String> selectStaffNumByKey(@Param("key") List<String> key, @Param("effDt") Date effDt,
@Param("expDt") Date expDt);
接口对应xml配置
<select id="selectStaffNumByKey" resultType="String" >
select
STAFF_NUM
from CREW_BASE_V
where BASE IN
<foreach collection="key" item="item" index="index" open="("
separator="," close=")">#{item}</foreach>
and EFF_DT < #{expDt,jdbcType=TIMESTAMP}
and (EXP_DT IS NULL OR EXP_DT > #{effDt,jdbcType=TIMESTAMP})
</select>
时间比较操作符< 小于,>大于,和IN的集合表示
相关文章推荐
- 穷人和富人的12大区别
- 杂谈:中国互联网早已经被群雄割据各自为王了
- IT行业常见职位英语缩写及中文释义
- strncpy()函数
- Service播放音乐实例
- 【JS设计模式】解释器模式代码示例
- C++ 随手笔记
- 常用 Git 命令清单
- 深度残差网络
- Docker入门教程(八)Docker Remote API
- android 空格占位符
- Freemarker细节小记
- Android之Matrix学习(一)
- JS/jQ实现免费获取手机验证码倒计时效果
- linux下svn的命令
- Linux操作笔记
- MySQL
- jquery事件绑定函数
- 4.django笔记之admin
- SpringBoot之Consuming a RESTful Web Service