<select id="findActiveBlogWithTitleLike" resultType="Blog">
SELECT * FROM BLOG
WHERE state = ‘ACTIVE’
<if test="title != null">
AND title like #{title}
</if>
</select>
属性名 | 作用 |
---|---|
id | Mapper对应的接口的映射名称 |
– | – |
resultType | 指定查询的结果是 返回的数据类型 |
<select id="findActiveBlogWithTitleLike" resultType="Blog">
SELECT * FROM BLOG
WHERE state = ‘ACTIVE’
<if test="title != null">
AND title like #{title}
</if>
</select>
属性名 | 作用 |
---|---|
id | Mapper对应的接口的映射名称 |
– | – |
resultType | 指定查询的结果是 返回的数据类型 |