From 9d964b572bbadb6475e0999afe277ad161ef7e43 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Wed, 23 Oct 2024 16:42:56 +0800 Subject: [PATCH] upadte app list api --- module/service/iml.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/service/iml.go b/module/service/iml.go index 9f3325ba..04d478a1 100644 --- a/module/service/iml.go +++ b/module/service/iml.go @@ -603,7 +603,7 @@ func (i *imlAppModule) Search(ctx context.Context, teamId string, keyword string } } - appMap, err := i.authService.CountByApp(ctx, serviceIds...) + authMap, err := i.authService.CountByApp(ctx, serviceIds...) if err != nil { return nil, err } @@ -621,7 +621,7 @@ func (i *imlAppModule) Search(ctx context.Context, teamId string, keyword string SubscribeNum: subscribeNum, SubscribeVerifyNum: verifyNum, CanDelete: subscribeNum == 0, - AuthNum: appMap[model.Id], + AuthNum: authMap[model.Id], }) } sort.Slice(items, func(i, j int) bool { @@ -728,6 +728,10 @@ func (i *imlAppModule) SearchMyApps(ctx context.Context, teamId string, keyword if err != nil { return nil, err } + authMap, err := i.authService.CountByApp(ctx, serviceIds...) + if err != nil { + return nil, err + } subscribeCount := map[string]int64{} subscribeVerifyCount := map[string]int64{} @@ -764,6 +768,7 @@ func (i *imlAppModule) SearchMyApps(ctx context.Context, teamId string, keyword SubscribeNum: subscribeNum, SubscribeVerifyNum: verifyNum, CanDelete: subscribeNum == 0, + AuthNum: authMap[model.Id], }) } sort.Slice(items, func(i, j int) bool {