mybatis实现模糊查询

<!--根据产品件号模糊查询机信息 -->
<select id="selectInStockByPartNum" resultType="com.inchlifc.entity.InStock">
    SELECT * FROM in_stock
    <where>
        <if test="partNum!=null">
            partNum LIKE CONCAT('%', #{partNum}, '%')
        </if>
    </where>
    ORDER BY createTime desc
</select>

 

posted on 2020-10-26 13:29  潮流教父孙笑川  阅读(7)  评论(0)    收藏  举报

导航