SQL模糊查询 同时匹配多个字段

 <select id="selectByTitleAndDocumentId" parameterType="java.lang.String" resultMap="BaseResultMap">
select * from guide where title like concat('%',#{title,jdbcType = VARCHAR},'%')
and document_id like concat('%',#{documentId,jdbcType = VARCHAR},'%') and del_flag = 0
</select>
原文地址:https://www.cnblogs.com/gslgb/p/12914837.html