Ver código fonte

Merge remote-tracking branch 'origin/master'

tmp
huangjiajun 3 semanas atrás
pai
commit
6a0fa3e786
1 arquivos alterados com 3 adições e 12 exclusões
  1. +3
    -12
      app/hdl/hdl_add_friend.go

+ 3
- 12
app/hdl/hdl_add_friend.go Ver arquivo

@@ -605,16 +605,7 @@ func MyFansUserList(c *gin.Context) {
limit := c.DefaultQuery("limit", "20")

now := time.Now()
val, exists := c.Get("user")
if !exists {
e.OutErr(c, e.ERR_USER_CHECK_ERR, nil)
return
}
user, ok := val.(*model.User)
if !ok {
e.OutErr(c, e.ERR_USER_CHECK_ERR, nil)
return
}
user := svc.GetUser(c)

energyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(db.Db)
eggEnergyBasicSetting, err := energyBasicSettingDb.EggEnergyBasicSettingGetOneByParams(map[string]interface{}{
@@ -664,9 +655,9 @@ func MyFansUserList(c *gin.Context) {
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.id " +
"where user_relate.uid IN(%s)"
"where user_relate.uid IN(%s) and user_relate.parent_uid = %d"
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))
sql = fmt.Sprintf(sql, strings.Join(userRelatesUids, ","), user.Id, (utils.StrToInt64(page)-1)*utils.StrToInt64(limit), utils.StrToInt64(limit))
results, err = db.QueryNativeString(db.Db, sql)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())


Carregando…
Cancelar
Salvar