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
|
||||
}
|
||||
|
||||
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 {
|
||||
return *cachedUsers, nil
|
||||
}
|
||||
@ -296,10 +296,11 @@ func (_UserService) SearchLimitUsers(keyword string, limit int) ([]model.JoinedU
|
||||
Type: u.Type,
|
||||
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, "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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user