修复token
This commit is contained in:
@@ -130,5 +130,17 @@
|
||||
FROM user WHERE user_latitude BETWEEN #{minLat} AND #{maxLat} AND user_longitude BETWEEN #{minLng} AND #{maxLng}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 搜索用户:支持用户名模糊匹配、爱好标签精确匹配 -->
|
||||
<select id="searchUsers" resultMap="UserResultMap">
|
||||
SELECT * FROM user
|
||||
WHERE 1=1
|
||||
<!-- 用户名模糊搜索 -->
|
||||
<if test="userName != null and userName != ''">
|
||||
AND user_name LIKE CONCAT('%', #{userName}, '%')
|
||||
</if>
|
||||
<!-- 爱好标签搜索:MySQL 8.0+ 支持JSON_CONTAINS -->
|
||||
<if test="hobbies != null and hobbies != ''">
|
||||
AND JSON_CONTAINS(hobbies, CONCAT('"', #{hobbies}, '"'))
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user