摘要:
Mybatis查询 resultMap 一对多查询 一对一 一对多查询 <resultMap type="User" id="UserResult"> <!--主键绑定--> <id property="userId" column="user_id" /> .................... 阅读全文
posted @ 2022-04-01 16:32
Tian-Jotian-Yongxing
阅读(64)
评论(0)
推荐(0)
摘要:
Mybatis查询 返回map集合 返回一个 <select id="getReturnMap" parameterType="int" resultType="map"> select username,address from users where id=#{id} </select> Map 阅读全文
posted @ 2022-04-01 16:00
Tian-Jotian-Yongxing
阅读(694)
评论(0)
推荐(0)
摘要:
Mybatis查询 动态sql < sql > and < include > <sql id="allColumns"> id ,username,birthday,sex,address</sql> <select id="方法名" resultType="users"> select <inc 阅读全文
posted @ 2022-04-01 15:48
Tian-Jotian-Yongxing
阅读(135)
评论(0)
推荐(0)
摘要:
Mybatis查询模糊查询 #{}安全 ${}存在sql注入 <select id="方法名" parameterType="参数类型" resultType="返回值类型">select * from 表名 where username like concat('%',#{注入的参数},'%')< 阅读全文
posted @ 2022-04-01 15:16
Tian-Jotian-Yongxing
阅读(49)
评论(0)
推荐(0)

浙公网安备 33010602011771号