您的位置:首页 > 其它

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的集合表示
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: