From 8caf069b8a14ddd9611ba56d168cc0f0dd3b47a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Thu, 29 Sep 2022 09:42:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(charge):=E4=BF=AE=E5=A4=8D=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=94=A8=E6=88=B7=E5=BB=B6=E6=9C=9F=E6=97=B6=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=88=97=E8=A1=A8=E6=97=A0=E6=B3=95=E5=88=97=E5=87=BA?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E7=A7=B0=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/user.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service/user.go b/service/user.go index 24da8c5..6658652 100644 --- a/service/user.go +++ b/service/user.go @@ -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 }