Browse Source

update

master
shenjiachi 5 days ago
parent
commit
0adfd6d9e4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/hdl/hdl_add_friend.go

+ 2
- 2
app/hdl/hdl_add_friend.go View File

@@ -588,7 +588,7 @@ func MyFans(c *gin.Context) {
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/v1/addFriend/myFansUserList [GET]
func MyFansUserList(c *gin.Context) {
page := c.DefaultQuery("page", "")
page := c.DefaultQuery("page", "1")
limit := c.DefaultQuery("limit", "20")

now := time.Now()
@@ -650,7 +650,7 @@ func MyFansUserList(c *gin.Context) {
var sql string
sql = "SELECT user.id AS uid, user.avatar AS avatar, user.nickname AS nickname, user_relate.invite_time AS invite_time " +
"FROM `user_relate` " +
"LEFT JOIN `user` ON user_relate.uid = user.uid " +
"LEFT JOIN `user` ON user_relate.uid = user.id " +
"where user_relate.uid IN(%s)"
sql += " ORDER BY user_relate.invite_time DESC LIMIT %d, %d;"
sql = fmt.Sprintf(sql, strings.Join(userRelatesUids, ","), (utils.StrToInt64(page)-1)*utils.StrToInt64(limit), utils.StrToInt64(limit))


Loading…
Cancel
Save