feat: @搜索优先展示已关注用户,结果限制最多5条

- SearchUsersByLevel SQL新增LEFT JOIN user_follows,按已关注优先+exp降序
- SearchUsers/followerUID参数贯穿repo→service→controller
- 继续输入时前端自动重新搜索新关键词
This commit is contained in:
2026-06-03 01:15:38 +08:00
parent fb9724faed
commit 864a488ee0
5 changed files with 21 additions and 15 deletions

View File

@ -155,7 +155,7 @@ type commentStore interface {
CreateMention(mention *model.CommentMention) error
FindPostIDByComment(commentID uint) (uint, error)
FindPostAuthorID(postID uint) (uint, error)
SearchUsersByLevel(keyword string, minLevel, limit int) ([]struct {
SearchUsersByLevel(keyword string, minLevel, limit int, followerUID uint) ([]struct {
UID uint
Username string
Avatar string