<sql id="selectSql">
<if test="name!=null and name!=''">
and name = #{name}
</if>
<if test="price!=null">
and price=#{price}
</if>
</sql>
<select id="findItemList" resultType="item">
select * from item
<where>
<include refid="selectSql"></include>
</where>
</select>
mybatis,sql引用
最新推荐文章于 2024-10-23 15:59:54 发布
351

被折叠的 条评论
为什么被折叠?



