增加MyBatis的Map参数传递和返回实例,支持分页。

This commit is contained in:
thinkgem
2018-08-04 15:54:47 +08:00
parent 6895d57cfa
commit dc088a4764
4 changed files with 36 additions and 4 deletions

View File

@@ -12,4 +12,17 @@
ORDER BY ${sqlMap.order.toSql()}
</select> -->
<!-- 演示Map参数和返回值支持分页 -->
<select id="findListForMap" resultType="map">
SELECT * FROM test_data a
<where>
<if test="testInput != null and testInput != ''">
AND a.test_input = #{testInput}
</if>
</where>
<if test="page != null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</if>
</select>
</mapper>