<select id="getSelectCloseInfo" resultMap="SelectCloseInfoResult" parameterClass="Integer">
select * from T_B_auto_close_delete where 1=1
<isNotEmpty prepend="and" property="TYPE"> <!-- property中为字段值 prepend中为连接词-->
<!-- 双##中为dao层传递过来的值,冒号后为值得类型-->
<!-- TYPE与property中的值对应,代表字段要传入的值,oracle的转义为"",mysql的转义为``,TYPE为关键字,需要转义-->
"TYPE"=#type:INTEGER#
</isNotEmpty>
order by ID
</select>
ibatis中xml编写sql语句与dao层的交互
最新推荐文章于 2022-08-22 10:18:20 发布