修复token

This commit is contained in:
lihaiyang
2026-01-20 17:11:20 +08:00
parent 2224b43fcb
commit 5e434e401a
6 changed files with 72 additions and 1 deletions

View File

@@ -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>