ibatis 参数类型为map,map里面有list
2016-01-11 18:12
435 查看
<select id="getChannelLayerList" parameterClass="java.util.HashMap"
resultMap="ChannelLayerMap">
SELECT * FROM
<dynamic>
<isEqual property="dataSource" compareValue="1">
channellayer
</isEqual>
<isEqual property="dataSource" compareValue="0">
channellayer_temp
</isEqual>
</dynamic>
<dynamic prepend="WHERE">
1=1
<isNotNull property="platForm">
and
platForm=#platForm#
</isNotNull>
<isNotNull property="provinceId">
and
provinceId=#provinceId#
</isNotNull>
<isNotNull property="cityId">
and
cityId=#cityId#
</isNotNull>
<isNotNull property="channelId">
and
channelId=#channelId#
</isNotNull>
<isNotNull property="typeId">
and
typeId=#typeId#
</isNotNull>
<isNotNull property="beginTime">
<![CDATA[ and beginTime >= #beginTime# ]]>
</isNotNull>
<isNotNull property="endTime">
<![CDATA[ and endTime<=#endTime# ]]>
</isNotNull>
<isNotNull property="batchIds">
and batchId in
<iterate property="batchIds" conjunction="," open="(" close=")">
#batchIds[]#
</iterate>
</isNotNull>
</dynamic>
ORDER
BY
updateTime desc,
isShow desc
</select>
resultMap="ChannelLayerMap">
SELECT * FROM
<dynamic>
<isEqual property="dataSource" compareValue="1">
channellayer
</isEqual>
<isEqual property="dataSource" compareValue="0">
channellayer_temp
</isEqual>
</dynamic>
<dynamic prepend="WHERE">
1=1
<isNotNull property="platForm">
and
platForm=#platForm#
</isNotNull>
<isNotNull property="provinceId">
and
provinceId=#provinceId#
</isNotNull>
<isNotNull property="cityId">
and
cityId=#cityId#
</isNotNull>
<isNotNull property="channelId">
and
channelId=#channelId#
</isNotNull>
<isNotNull property="typeId">
and
typeId=#typeId#
</isNotNull>
<isNotNull property="beginTime">
<![CDATA[ and beginTime >= #beginTime# ]]>
</isNotNull>
<isNotNull property="endTime">
<![CDATA[ and endTime<=#endTime# ]]>
</isNotNull>
<isNotNull property="batchIds">
and batchId in
<iterate property="batchIds" conjunction="," open="(" close=")">
#batchIds[]#
</iterate>
</isNotNull>
</dynamic>
ORDER
BY
updateTime desc,
isShow desc
</select>
相关文章推荐
- 网易首页导航封装类优化
- poj--3169--Layout(简单差分约束)
- radware alteon 负载均衡器设置
- 高仿网易评论列表效果之界面生成(三)
- python数字图像处理(3):图像像素的访问与裁剪
- poj--3169--Layout(简单差分约束)
- 根据结构体的一部分,进行排序,从而对该结构体排序
- SQL Server中使用正则表达式
- final关键字
- linux消息队列编程实例
- 高仿网易评论列表效果之数据准备(二)
- win键盘映射成mac键盘
- 生命太短暂,我没时间讨厌你
- 如何在修改bug时切换分支保留修改又不提交
- 高仿网易评论列表效果之界面分析(一)
- FileMode枚举
- 刘登攀千人大会复出 获投资1000万元
- 如何进行资源的热修复
- POJ3660 Cow Contest(floyd算法应用)
- 手机触摸事件 例子div随手指移动