<select id="searchUser" parameterType="java.lang.String" resultType="com.datebook.vo.UserDetailVO">
select id,mobile,header,nickname,gender,birthday,signature,photoes,book_cnt
from user where <!-- nickname like CONCAT('%',#{key},'%')
or mobile like CONCAT('%',#{key},'%') -->
MATCH (nickname,mobile) AGAINST (#{key} IN NATURAL LANGUAGE MODE)
</select>
mybatis 模糊查询(like和match against两种)
最新推荐文章于 2024-05-27 10:17:28 发布