diff --git a/server/info/internal/logic/prelogosearchlogic.go b/server/info/internal/logic/prelogosearchlogic.go index 36b8f433..eef2abd4 100644 --- a/server/info/internal/logic/prelogosearchlogic.go +++ b/server/info/internal/logic/prelogosearchlogic.go @@ -33,7 +33,7 @@ func NewPreLogoSearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Pre func (l *PreLogoSearchLogic) PreLogoSearch(req *types.PreLogoSearchRequest, userinfo *auth.UserInfo) (resp *basic.Response) { // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) // userinfo 传入值时, 一定不为null - if !userinfo.IsOnlooker() { + if userinfo.IsOnlooker() { return resp.SetStatus(basic.CodeSearchAuthErr) } diff --git a/server/info/internal/logic/prelogosearchsuggestionslogic.go b/server/info/internal/logic/prelogosearchsuggestionslogic.go index d23e6021..a920e4a9 100644 --- a/server/info/internal/logic/prelogosearchsuggestionslogic.go +++ b/server/info/internal/logic/prelogosearchsuggestionslogic.go @@ -33,7 +33,7 @@ func NewPreLogoSearchSuggestionsLogic(ctx context.Context, svcCtx *svc.ServiceCo func (l *PreLogoSearchSuggestionsLogic) PreLogoSearchSuggestions(req *types.PreLogoSearchSuggestionsRequest, userinfo *auth.UserInfo) (resp *basic.Response) { // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) // userinfo 传入值时, 一定不为null - if !userinfo.IsOnlooker() { + if userinfo.IsOnlooker() { return resp.SetStatus(basic.CodeSearchAuthErr) }