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