From 4f07c86e7ecc0679cde66dbe29d267be77d152f1 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Fri, 20 Oct 2023 11:41:50 +0800 Subject: [PATCH] logo search --- server_api/info.api | 14 ++++++++++++++ utils/basic/basic.go | 11 ++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/server_api/info.api b/server_api/info.api index c5131142..3641e770 100644 --- a/server_api/info.api +++ b/server_api/info.api @@ -39,6 +39,14 @@ service info { @handler RestaurantListHandler get /api/info/restaurant/list(request) returns (response); + + // 搜索建议 + @handler PreLogoSearchSuggestionsHandler + post /api/info/prelogo/search/suggestions(PreLogoSearchRequest) returns (response); + + // 搜索 + @handler PreLogoSearchHandler + post /api/info/prelogo/search(PreLogoSearchRequest) returns (response); @handler ContactUsHandler post /api/info/contact/us(ContactUsRequest) returns (response); @@ -51,6 +59,12 @@ type ( Phone string `json:"phone"` Message string `json:"message"` } + + + PreLogoSearchRequest { + ZipCode string `json:"zip_code"` // 邮编 + Keywords int64 `json:"keywords"` // 关键字 + } UserInfoRequest { Module []string `json:"module"` diff --git a/utils/basic/basic.go b/utils/basic/basic.go index 37868c51..1e72b99b 100644 --- a/utils/basic/basic.go +++ b/utils/basic/basic.go @@ -33,11 +33,12 @@ type StatusResponse struct { } var ( - CodeOK = &StatusResponse{200, "success"} // 成功 - CodeApiErr = &StatusResponse{500, "api error"} // API错误 - CodeSaveErr = &StatusResponse{501, "failed to save"} // 保存失败 - CodeServiceErr = &StatusResponse{510, "server logic error"} // 服务逻辑错误 - CodeUnAuth = &StatusResponse{401, "unauthorized"} // 未授权 + CodeOK = &StatusResponse{200, "success"} // 成功 + CodeApiErr = &StatusResponse{500, "api error"} // API错误 + CodeSaveErr = &StatusResponse{501, "failed to save"} // 保存失败 + CodeServiceErr = &StatusResponse{510, "server logic error"} // 服务逻辑错误 + CodeUnAuth = &StatusResponse{401, "unauthorized"} // 未授权 + CodeUnDebugAuth = &StatusResponse{5401, "unauthorized"} // debug未授权 CodeOAuthGoogleApiErr = &StatusResponse{5070, "oauth2 google api error"} CodeOAuthRegisterTokenErr = &StatusResponse{5071, "oauth2 register create token error"}