MyBatis
文章平均质量分 85
李维涛
这个作者很懒,什么都没留下…
展开
-
【MyBatis】动态SQL
(1) 动态元素 (2) if元素(和test属性联合使用) select role_no , role_name , note from t_role where 1=1 and role_name like concat(‘%’ , #{roleName} , ‘%’) (3) choose、when、otherwise元素 实例: 当角色编号原创 2017-06-05 20:05:14 · 382 阅读 · 3 评论 -
【MyBatis】映射器(1)
(1)select元素 A:配置 countFirstName”parameterType=”string” resultType=”int”> select count(*) as total from t_user where name like concat(#{firstName},’%’) 在接口UserDao中定义方法: pub原创 2017-06-08 09:36:17 · 364 阅读 · 3 评论