mybatis和ibatis的配置文件使用>和<的情况
<使用<替代
>使用>替代
<update id="MS-NOTIFY-MSG-BATCH-UPDATE_IPADDR">
update T_NOTIFY_MSG set IP_ADDR=#ipAddr#, GMT_MODIFIED=systimestamp where MSG_ID in (
select MSG_ID from (
SELECT MSG_ID
FROM T_NOTIFY_MSG
WHERE IP_ADDR is null and GMT_PRE_TIME >=(sysdate-1) and GMT_PRE_TIME <= sysdate
<isNotNull property="notifyType" prepend=" and ">NOTIFY_TYPE=#notifyType# </isNotNull>
<isNotNull property="status" prepend=" and ">STATUS = #status# </isNotNull>
<isNotNull property="msgType" prepend=" and ">MSG_TYPE=#msgType# </isNotNull>
ORDER BY GMT_CREATE ASC
) where rownum <= #maxSize#
) and IP_ADDR is null and GMT_PRE_TIME <= sysdate
</update>

本文展示了一个使用MyBatis和iBatis的更新语句配置示例,该示例通过动态SQL特性实现了批量更新操作。具体包括如何设置参数、使用条件判断以及SQL子句的组合。
1万+

被折叠的 条评论
为什么被折叠?



