ibatis学习
txwhmeng
这个作者很懒,什么都没留下…
展开
-
mybatis(ibatis)定义公共查询语句,拼接sql,以达到简化
首先我们定义公共查询语句<sql></sql> id为唯一标识符:<sql id="sql_row_start"> <!-- isPropertyAvailable表示有从dao传来的这个字段值rowStart,既有这个值,property的值为传入字段的值--> <isPropertyAvailable property="rowStart"> <!--isNotEmpty表示从dao传来的这个字段原创 2021-10-20 16:17:03 · 846 阅读 · 0 评论 -
ibatis中xml编写sql语句与dao层的交互
<select id="getSelectCloseInfo" resultMap="SelectCloseInfoResult" parameterClass="Integer"> select * from T_B_auto_close_delete where 1=1 <isNotEmpty prepend="and" property="TYPE"> <!-- property中为字段值 prepend中为连接词--> .原创 2021-10-15 17:15:18 · 364 阅读 · 0 评论