fix(charge):修复记录用户延期时用户列表无法列出用户名称的问题。
This commit is contained in:
parent
11cc6f0de1
commit
8caf069b8a
@ -259,7 +259,7 @@ func (u _UserService) SwitchUserState(uid string, enabled bool) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_UserService) SearchLimitUsers(keyword string, limit int) ([]model.JoinedUserDetail, error) {
|
func (us _UserService) SearchLimitUsers(keyword string, limit int) ([]model.JoinedUserDetail, error) {
|
||||||
if cachedUsers, _ := cache.RetreiveSearch[[]model.JoinedUserDetail]("join_user_detail", keyword, strconv.Itoa(limit)); cachedUsers != nil {
|
if cachedUsers, _ := cache.RetreiveSearch[[]model.JoinedUserDetail]("join_user_detail", keyword, strconv.Itoa(limit)); cachedUsers != nil {
|
||||||
return *cachedUsers, nil
|
return *cachedUsers, nil
|
||||||
}
|
}
|
||||||
@ -296,10 +296,11 @@ func (_UserService) SearchLimitUsers(keyword string, limit int) ([]model.JoinedU
|
|||||||
Type: u.Type,
|
Type: u.Type,
|
||||||
Enabled: u.Enabled,
|
Enabled: u.Enabled,
|
||||||
})
|
})
|
||||||
|
us.l.Debug("Check", zap.Any("User", u), zap.Any("Detail", u.Detail), zap.Any("assembled", detailedUsers))
|
||||||
relations = append(relations, fmt.Sprintf("user:%s", u.Id))
|
relations = append(relations, fmt.Sprintf("user:%s", u.Id))
|
||||||
}
|
}
|
||||||
relations = append(relations, "user")
|
relations = append(relations, "user")
|
||||||
cache.CacheSearch(users, relations, "join_user_detail", keyword, strconv.Itoa(limit))
|
cache.CacheSearch(detailedUsers, relations, "join_user_detail", keyword, strconv.Itoa(limit))
|
||||||
return detailedUsers, nil
|
return detailedUsers, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user