From 859c101c5143f8f4f4f4a09c54ee22ce99d51a75 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Thu, 8 Jun 2023 10:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=8Aserver=E5=BD=92=E5=88=B0=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fs_gen_api.sh | 4 +- .../internal/logic/userstatusconfiglogic.go | 31 ------- .../home-user-auth}/etc/home-user-auth.yaml | 0 .../home-user-auth}/home-user-auth.go | 6 +- .../home-user-auth}/home-user-auth_test.go | 0 .../home-user-auth}/internal/config/config.go | 2 +- .../internal/handler/gettypehandler.go | 6 +- .../internal/handler/routes.go | 2 +- .../internal/handler/userbasicinfohandler.go | 6 +- .../internal/handler/userfontshandler.go | 6 +- .../internal/handler/userloginhandler.go | 6 +- .../handler/usersavebasicinfohandler.go | 6 +- .../handler/userstatusconfighandler.go | 6 +- .../internal/logic/gettypelogic.go | 4 +- .../internal/logic/userbasicinfologic.go | 4 +- .../internal/logic/userfontslogic.go | 4 +- .../internal/logic/userloginlogic.go | 4 +- .../internal/logic/usersavebasicinfologic.go | 4 +- .../internal/logic/userstatusconfiglogic.go | 92 +++++++++++++++++++ .../internal/svc/servicecontext.go | 3 +- .../home-user-auth}/internal/types/types.go | 22 +++++ {product => server/product}/etc/product.yaml | 0 .../product}/internal/config/config.go | 0 .../internal/handler/getproductlisthandler.go | 0 .../handler/getsizebyproducthandler.go | 0 .../handler/getsuccessrecommandhandler.go | 0 .../product}/internal/handler/routes.go | 0 .../internal/logic/getproductlistlogic.go | 0 .../internal/logic/getsizebyproductlogic.go | 0 .../logic/getsuccessrecommandlogic.go | 0 .../product}/internal/svc/servicecontext.go | 0 .../product}/internal/types/types.go | 0 {product => server/product}/product.go | 0 {product => server/product}/product_test.go | 0 server_api/basic.api | 3 +- server_api/home-user-auth.api | 25 +++++ 36 files changed, 179 insertions(+), 67 deletions(-) delete mode 100644 home-user-auth/internal/logic/userstatusconfiglogic.go rename {home-user-auth => server/home-user-auth}/etc/home-user-auth.yaml (100%) rename {home-user-auth => server/home-user-auth}/home-user-auth.go (77%) rename {home-user-auth => server/home-user-auth}/home-user-auth_test.go (100%) rename {home-user-auth => server/home-user-auth}/internal/config/config.go (75%) rename {home-user-auth => server/home-user-auth}/internal/handler/gettypehandler.go (83%) rename {home-user-auth => server/home-user-auth}/internal/handler/routes.go (95%) rename {home-user-auth => server/home-user-auth}/internal/handler/userbasicinfohandler.go (84%) rename {home-user-auth => server/home-user-auth}/internal/handler/userfontshandler.go (83%) rename {home-user-auth => server/home-user-auth}/internal/handler/userloginhandler.go (86%) rename {home-user-auth => server/home-user-auth}/internal/handler/usersavebasicinfohandler.go (84%) rename {home-user-auth => server/home-user-auth}/internal/handler/userstatusconfighandler.go (84%) rename {home-user-auth => server/home-user-auth}/internal/logic/gettypelogic.go (87%) rename {home-user-auth => server/home-user-auth}/internal/logic/userbasicinfologic.go (90%) rename {home-user-auth => server/home-user-auth}/internal/logic/userfontslogic.go (87%) rename {home-user-auth => server/home-user-auth}/internal/logic/userloginlogic.go (94%) rename {home-user-auth => server/home-user-auth}/internal/logic/usersavebasicinfologic.go (90%) create mode 100644 server/home-user-auth/internal/logic/userstatusconfiglogic.go rename {home-user-auth => server/home-user-auth}/internal/svc/servicecontext.go (85%) rename {home-user-auth => server/home-user-auth}/internal/types/types.go (84%) rename {product => server/product}/etc/product.yaml (100%) rename {product => server/product}/internal/config/config.go (100%) rename {product => server/product}/internal/handler/getproductlisthandler.go (100%) rename {product => server/product}/internal/handler/getsizebyproducthandler.go (100%) rename {product => server/product}/internal/handler/getsuccessrecommandhandler.go (100%) rename {product => server/product}/internal/handler/routes.go (100%) rename {product => server/product}/internal/logic/getproductlistlogic.go (100%) rename {product => server/product}/internal/logic/getsizebyproductlogic.go (100%) rename {product => server/product}/internal/logic/getsuccessrecommandlogic.go (100%) rename {product => server/product}/internal/svc/servicecontext.go (100%) rename {product => server/product}/internal/types/types.go (100%) rename {product => server/product}/product.go (100%) rename {product => server/product}/product_test.go (100%) diff --git a/fs_gen_api.sh b/fs_gen_api.sh index 56320f79..98f71fa0 100755 --- a/fs_gen_api.sh +++ b/fs_gen_api.sh @@ -1,2 +1,4 @@ #! /bin/bash -goctl api go -api server_api/$1.api -dir $1 --home ./goctl_template/ \ No newline at end of file +name=${1%\/} +echo $name +goctl api go -api server_api/$name.api -dir server/$name --home ./goctl_template/ \ No newline at end of file diff --git a/home-user-auth/internal/logic/userstatusconfiglogic.go b/home-user-auth/internal/logic/userstatusconfiglogic.go deleted file mode 100644 index c3d3cbac..00000000 --- a/home-user-auth/internal/logic/userstatusconfiglogic.go +++ /dev/null @@ -1,31 +0,0 @@ -package logic - -import ( - "context" - - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" - "fusenapi/utils/basic" - - "github.com/zeromicro/go-zero/core/logx" -) - -type UserStatusConfigLogic struct { - logx.Logger - ctx context.Context - svcCtx *svc.ServiceContext -} - -func NewUserStatusConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserStatusConfigLogic { - return &UserStatusConfigLogic{ - Logger: logx.WithContext(ctx), - ctx: ctx, - svcCtx: svcCtx, - } -} - -func (l *UserStatusConfigLogic) UserStatusConfig(req *types.RequestBasicInfoForm) (resp *types.Response) { - // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) - - return resp.SetStatus(basic.CodeOK) -} diff --git a/home-user-auth/etc/home-user-auth.yaml b/server/home-user-auth/etc/home-user-auth.yaml similarity index 100% rename from home-user-auth/etc/home-user-auth.yaml rename to server/home-user-auth/etc/home-user-auth.yaml diff --git a/home-user-auth/home-user-auth.go b/server/home-user-auth/home-user-auth.go similarity index 77% rename from home-user-auth/home-user-auth.go rename to server/home-user-auth/home-user-auth.go index 86eb25e8..7e44ddff 100644 --- a/home-user-auth/home-user-auth.go +++ b/server/home-user-auth/home-user-auth.go @@ -4,9 +4,9 @@ import ( "flag" "fmt" - "fusenapi/home-user-auth/internal/config" - "fusenapi/home-user-auth/internal/handler" - "fusenapi/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/config" + "fusenapi/server/home-user-auth/internal/handler" + "fusenapi/server/home-user-auth/internal/svc" "github.com/zeromicro/go-zero/core/conf" "github.com/zeromicro/go-zero/rest" diff --git a/home-user-auth/home-user-auth_test.go b/server/home-user-auth/home-user-auth_test.go similarity index 100% rename from home-user-auth/home-user-auth_test.go rename to server/home-user-auth/home-user-auth_test.go diff --git a/home-user-auth/internal/config/config.go b/server/home-user-auth/internal/config/config.go similarity index 75% rename from home-user-auth/internal/config/config.go rename to server/home-user-auth/internal/config/config.go index 91e8781b..825f66bc 100644 --- a/home-user-auth/internal/config/config.go +++ b/server/home-user-auth/internal/config/config.go @@ -1,7 +1,7 @@ package config import ( - "fusenapi/home-user-auth/internal/types" + "fusenapi/server/home-user-auth/internal/types" "github.com/zeromicro/go-zero/rest" ) diff --git a/home-user-auth/internal/handler/gettypehandler.go b/server/home-user-auth/internal/handler/gettypehandler.go similarity index 83% rename from home-user-auth/internal/handler/gettypehandler.go rename to server/home-user-auth/internal/handler/gettypehandler.go index 72416df1..a7a70ba8 100644 --- a/home-user-auth/internal/handler/gettypehandler.go +++ b/server/home-user-auth/internal/handler/gettypehandler.go @@ -7,9 +7,9 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/home-user-auth/internal/logic" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" + "fusenapi/server/home-user-auth/internal/logic" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" ) func GetTypeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/home-user-auth/internal/handler/routes.go b/server/home-user-auth/internal/handler/routes.go similarity index 95% rename from home-user-auth/internal/handler/routes.go rename to server/home-user-auth/internal/handler/routes.go index b1e03545..342f559a 100644 --- a/home-user-auth/internal/handler/routes.go +++ b/server/home-user-auth/internal/handler/routes.go @@ -4,7 +4,7 @@ package handler import ( "net/http" - "fusenapi/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/svc" "github.com/zeromicro/go-zero/rest" ) diff --git a/home-user-auth/internal/handler/userbasicinfohandler.go b/server/home-user-auth/internal/handler/userbasicinfohandler.go similarity index 84% rename from home-user-auth/internal/handler/userbasicinfohandler.go rename to server/home-user-auth/internal/handler/userbasicinfohandler.go index 10518661..f943a476 100644 --- a/home-user-auth/internal/handler/userbasicinfohandler.go +++ b/server/home-user-auth/internal/handler/userbasicinfohandler.go @@ -7,9 +7,9 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/home-user-auth/internal/logic" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" + "fusenapi/server/home-user-auth/internal/logic" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" ) func UserBasicInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/home-user-auth/internal/handler/userfontshandler.go b/server/home-user-auth/internal/handler/userfontshandler.go similarity index 83% rename from home-user-auth/internal/handler/userfontshandler.go rename to server/home-user-auth/internal/handler/userfontshandler.go index 7b525cea..ce8effe7 100644 --- a/home-user-auth/internal/handler/userfontshandler.go +++ b/server/home-user-auth/internal/handler/userfontshandler.go @@ -7,9 +7,9 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/home-user-auth/internal/logic" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" + "fusenapi/server/home-user-auth/internal/logic" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" ) func UserFontsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/home-user-auth/internal/handler/userloginhandler.go b/server/home-user-auth/internal/handler/userloginhandler.go similarity index 86% rename from home-user-auth/internal/handler/userloginhandler.go rename to server/home-user-auth/internal/handler/userloginhandler.go index dd49bff5..a7dde4ef 100644 --- a/home-user-auth/internal/handler/userloginhandler.go +++ b/server/home-user-auth/internal/handler/userloginhandler.go @@ -8,9 +8,9 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/home-user-auth/internal/logic" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" + "fusenapi/server/home-user-auth/internal/logic" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" "fusenapi/utils/basic" ) diff --git a/home-user-auth/internal/handler/usersavebasicinfohandler.go b/server/home-user-auth/internal/handler/usersavebasicinfohandler.go similarity index 84% rename from home-user-auth/internal/handler/usersavebasicinfohandler.go rename to server/home-user-auth/internal/handler/usersavebasicinfohandler.go index 353a32b8..c63ff004 100644 --- a/home-user-auth/internal/handler/usersavebasicinfohandler.go +++ b/server/home-user-auth/internal/handler/usersavebasicinfohandler.go @@ -7,9 +7,9 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/home-user-auth/internal/logic" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" + "fusenapi/server/home-user-auth/internal/logic" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" ) func UserSaveBasicInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/home-user-auth/internal/handler/userstatusconfighandler.go b/server/home-user-auth/internal/handler/userstatusconfighandler.go similarity index 84% rename from home-user-auth/internal/handler/userstatusconfighandler.go rename to server/home-user-auth/internal/handler/userstatusconfighandler.go index 2c1e0406..47bdd347 100644 --- a/home-user-auth/internal/handler/userstatusconfighandler.go +++ b/server/home-user-auth/internal/handler/userstatusconfighandler.go @@ -7,9 +7,9 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/home-user-auth/internal/logic" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" + "fusenapi/server/home-user-auth/internal/logic" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" ) func UserStatusConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/home-user-auth/internal/logic/gettypelogic.go b/server/home-user-auth/internal/logic/gettypelogic.go similarity index 87% rename from home-user-auth/internal/logic/gettypelogic.go rename to server/home-user-auth/internal/logic/gettypelogic.go index 7186460b..ac24d600 100644 --- a/home-user-auth/internal/logic/gettypelogic.go +++ b/server/home-user-auth/internal/logic/gettypelogic.go @@ -3,9 +3,9 @@ package logic import ( "context" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" "fusenapi/model" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" "fusenapi/utils/basic" "github.com/zeromicro/go-zero/core/logx" diff --git a/home-user-auth/internal/logic/userbasicinfologic.go b/server/home-user-auth/internal/logic/userbasicinfologic.go similarity index 90% rename from home-user-auth/internal/logic/userbasicinfologic.go rename to server/home-user-auth/internal/logic/userbasicinfologic.go index 1ae44c8e..b3288cb8 100644 --- a/home-user-auth/internal/logic/userbasicinfologic.go +++ b/server/home-user-auth/internal/logic/userbasicinfologic.go @@ -2,9 +2,9 @@ package logic import ( "context" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" "fusenapi/model" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" "fusenapi/utils/auth" "fusenapi/utils/basic" diff --git a/home-user-auth/internal/logic/userfontslogic.go b/server/home-user-auth/internal/logic/userfontslogic.go similarity index 87% rename from home-user-auth/internal/logic/userfontslogic.go rename to server/home-user-auth/internal/logic/userfontslogic.go index 87bce8a9..1b8b83f7 100644 --- a/home-user-auth/internal/logic/userfontslogic.go +++ b/server/home-user-auth/internal/logic/userfontslogic.go @@ -3,9 +3,9 @@ package logic import ( "context" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" "fusenapi/model" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" "fusenapi/utils/basic" "github.com/zeromicro/go-zero/core/logx" diff --git a/home-user-auth/internal/logic/userloginlogic.go b/server/home-user-auth/internal/logic/userloginlogic.go similarity index 94% rename from home-user-auth/internal/logic/userloginlogic.go rename to server/home-user-auth/internal/logic/userloginlogic.go index b8f0c551..58c9230f 100644 --- a/home-user-auth/internal/logic/userloginlogic.go +++ b/server/home-user-auth/internal/logic/userloginlogic.go @@ -4,9 +4,9 @@ import ( "context" "time" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" "fusenapi/model" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" "fusenapi/utils/basic" "github.com/golang-jwt/jwt" diff --git a/home-user-auth/internal/logic/usersavebasicinfologic.go b/server/home-user-auth/internal/logic/usersavebasicinfologic.go similarity index 90% rename from home-user-auth/internal/logic/usersavebasicinfologic.go rename to server/home-user-auth/internal/logic/usersavebasicinfologic.go index 6dda6c5f..d8295142 100644 --- a/home-user-auth/internal/logic/usersavebasicinfologic.go +++ b/server/home-user-auth/internal/logic/usersavebasicinfologic.go @@ -4,9 +4,9 @@ import ( "context" "fusenapi/utils/auth" - "fusenapi/home-user-auth/internal/svc" - "fusenapi/home-user-auth/internal/types" "fusenapi/model" + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" "fusenapi/utils/basic" "github.com/zeromicro/go-zero/core/logx" diff --git a/server/home-user-auth/internal/logic/userstatusconfiglogic.go b/server/home-user-auth/internal/logic/userstatusconfiglogic.go new file mode 100644 index 00000000..6515100b --- /dev/null +++ b/server/home-user-auth/internal/logic/userstatusconfiglogic.go @@ -0,0 +1,92 @@ +package logic + +import ( + "context" + + "fusenapi/server/home-user-auth/internal/svc" + "fusenapi/server/home-user-auth/internal/types" + "fusenapi/utils/basic" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UserStatusConfigLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewUserStatusConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserStatusConfigLogic { + return &UserStatusConfigLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *UserStatusConfigLogic) UserStatusConfig(req *types.RequestBasicInfoForm) (resp *types.Response) { + // 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data) + + return resp.SetStatus(basic.CodeOK) +} + +// [ +// //返回订单每个状态值 +// //搜索下拉列表 +// 'search_list' => [ +// ['key' => -1, "name" => 'All'], +// ['key' => 1, "name" => 'Order Has Been Placed'], +// ['key' => 2, "name" => 'In Production'], +// ['key' => 3, "name" => 'Shipped'], +// ['key' => 4, "name" => 'Inventory'], +// ['key' => 8, "name" => 'Ready for Shipment'], +// ['key' => 5, "name" => 'Completed'], +// // ['key' => 6, "name" => 'Refund Under Review'], +// ['key' => 7, "name" => 'Transaction Closed'], +// ], +// //直邮单状态 +// 'order_status' => [ +// ['key' => 1, "name" => 'Order Has Been Placed', 'button' => ['download_invoice', 'cancel', 'again', 'toPay']], +// ['key' => 2, "name" => 'In Production', 'button' => ['download_invoice', 'again', 'toPay']], +// ['key' => 3, "name" => 'Shipped', 'button' => ['download_invoice', 'again', 'view_logistics']], +// ['key' => 5, "name" => 'Completed', 'button' => ['download_invoice', 'again', 'view_logistics', 'delete']], +// // ['key' => 6, "name" => 'Refund Under Review', 'button' => ['again', 'delete']], +// ['key' => 7, "name" => 'Transaction Closed', 'button' => ['again', 'delete']], +// ], +// //云仓单状态 +// 'Inventory_status' => [ +// ['key' => 1, "name" => 'Order Has Been Placed', 'button' => ['download_invoice', 'cancel', 'again', 'toPay']], +// ['key' => 2, "name" => 'In Production', 'button' => ['download_invoice', 'again', 'toPay']], +// ['key' => 4, "name" => 'Inventory', 'button' => ['download_invoice', 'again', 'go_cloud', 'toPay']], +// ['key' => 8, "name" => 'Ready for Shipment', 'button' => ['download_invoice', 'again', 'go_cloud', 'delete']], +// // ['key' => 6, "name" => 'Refund Under Review', 'button' => ['again', 'delete']], +// ['key' => 7, "name" => 'Transaction Closed', 'button' => ['again', 'delete']], +// ], +// //订单物流状态 +// 'order_logistics_status' => Order::$statusFontLogisticOrder, +// //订单物流状态 +// 'Inventory_logistics_status' => Order::$statusFontLogisticInventory, +// //返回订单时间筛选项 +// 'time' => [ +// ['key' => 0, 'name' => 'All'], +// ['key' => 1, 'name' => 'within a month'], +// ['key' => 2, 'name' => 'within a quarter'], +// ['key' => 3, 'name' => 'Within half a year'], +// ['key' => 4, 'name' => 'Within a year'], +// ], +// //退款原因说明项 +// 'refund_reason' => [ +// ['key' => 1, 'name' => 'I don\'t want it anymore'], +// ['key' => 2, 'name' => 'no reason'], +// ['key' => 3, 'name' => 'other'], +// ], +// //物流状态筛选项 +// 'logistics_status' => [ +// ['key' => -1, "name" => 'All'], +// ['key' => 1, "name" => 'Draw', 'button' => []], +// ['key' => 2, "name" => 'Shipping', 'button' => []], +// // ['key' => Deliver::STATUS_PORT, "name" => 'To the port', 'button' => []], +// ['key' => 3, "name" => 'UPS pick up', 'button' => ['check_detail']], +// ['key' => 4, "name" => 'Arrival', 'button' => []], +// ] +// ]; diff --git a/home-user-auth/internal/svc/servicecontext.go b/server/home-user-auth/internal/svc/servicecontext.go similarity index 85% rename from home-user-auth/internal/svc/servicecontext.go rename to server/home-user-auth/internal/svc/servicecontext.go index ae38bc4c..71e4ce9b 100644 --- a/home-user-auth/internal/svc/servicecontext.go +++ b/server/home-user-auth/internal/svc/servicecontext.go @@ -1,7 +1,8 @@ package svc import ( - "fusenapi/home-user-auth/internal/config" + "fusenapi/server/home-user-auth/internal/config" + "github.com/zeromicro/go-zero/core/stores/sqlx" ) diff --git a/home-user-auth/internal/types/types.go b/server/home-user-auth/internal/types/types.go similarity index 84% rename from home-user-auth/internal/types/types.go rename to server/home-user-auth/internal/types/types.go index a785df49..aba9b3ec 100644 --- a/home-user-auth/internal/types/types.go +++ b/server/home-user-auth/internal/types/types.go @@ -69,6 +69,28 @@ type DataGetType struct { Name string `db:"name" json:"name"` // 餐厅名字 } +type KeyName struct { + Key string `json:"key"` + Name string `json:"name"` +} + +type KeyNameButton struct { + Key string `json:"key"` + Name string `json:"name"` + Button []string `json:"button"` +} + +type DataStatusConfig struct { + SearchList []KeyName `json:"search_list"` //搜索下拉列表 + OrderStatus []KeyNameButton `json:"order_status"` //直邮单状态 + InventoryStatus []KeyNameButton `json:"Inventory_status"` //云仓单状态 + OrderLogisticsStatus []KeyName `json:"order_logistics_status"` //订单物流状态 + InventoryLogisticsStatus []KeyName `json:"Inventory_logistics_status"` //订单物流状态 + Time []KeyName `json:"time"` //返回订单时间筛选项 + RefundReason []KeyName `json:"refund_reason"` //退款原因说明项 + LogisticsStatus []KeyName `json:"logistics_status"` //物流状态筛选项 +} + type Response struct { Code int `json:"code"` Message string `json:"msg"` diff --git a/product/etc/product.yaml b/server/product/etc/product.yaml similarity index 100% rename from product/etc/product.yaml rename to server/product/etc/product.yaml diff --git a/product/internal/config/config.go b/server/product/internal/config/config.go similarity index 100% rename from product/internal/config/config.go rename to server/product/internal/config/config.go diff --git a/product/internal/handler/getproductlisthandler.go b/server/product/internal/handler/getproductlisthandler.go similarity index 100% rename from product/internal/handler/getproductlisthandler.go rename to server/product/internal/handler/getproductlisthandler.go diff --git a/product/internal/handler/getsizebyproducthandler.go b/server/product/internal/handler/getsizebyproducthandler.go similarity index 100% rename from product/internal/handler/getsizebyproducthandler.go rename to server/product/internal/handler/getsizebyproducthandler.go diff --git a/product/internal/handler/getsuccessrecommandhandler.go b/server/product/internal/handler/getsuccessrecommandhandler.go similarity index 100% rename from product/internal/handler/getsuccessrecommandhandler.go rename to server/product/internal/handler/getsuccessrecommandhandler.go diff --git a/product/internal/handler/routes.go b/server/product/internal/handler/routes.go similarity index 100% rename from product/internal/handler/routes.go rename to server/product/internal/handler/routes.go diff --git a/product/internal/logic/getproductlistlogic.go b/server/product/internal/logic/getproductlistlogic.go similarity index 100% rename from product/internal/logic/getproductlistlogic.go rename to server/product/internal/logic/getproductlistlogic.go diff --git a/product/internal/logic/getsizebyproductlogic.go b/server/product/internal/logic/getsizebyproductlogic.go similarity index 100% rename from product/internal/logic/getsizebyproductlogic.go rename to server/product/internal/logic/getsizebyproductlogic.go diff --git a/product/internal/logic/getsuccessrecommandlogic.go b/server/product/internal/logic/getsuccessrecommandlogic.go similarity index 100% rename from product/internal/logic/getsuccessrecommandlogic.go rename to server/product/internal/logic/getsuccessrecommandlogic.go diff --git a/product/internal/svc/servicecontext.go b/server/product/internal/svc/servicecontext.go similarity index 100% rename from product/internal/svc/servicecontext.go rename to server/product/internal/svc/servicecontext.go diff --git a/product/internal/types/types.go b/server/product/internal/types/types.go similarity index 100% rename from product/internal/types/types.go rename to server/product/internal/types/types.go diff --git a/product/product.go b/server/product/product.go similarity index 100% rename from product/product.go rename to server/product/product.go diff --git a/product/product_test.go b/server/product/product_test.go similarity index 100% rename from product/product_test.go rename to server/product/product_test.go diff --git a/server_api/basic.api b/server_api/basic.api index c69aad4d..d979d3be 100644 --- a/server_api/basic.api +++ b/server_api/basic.api @@ -30,4 +30,5 @@ type Auth { AccessSecret string `json:"accessSecret"` AccessExpire int64 `json:"accessExpire"` RefreshAfter int64 `json:"refreshAfter"` -} \ No newline at end of file +} + diff --git a/server_api/home-user-auth.api b/server_api/home-user-auth.api index fd1bd500..17a1ddfa 100644 --- a/server_api/home-user-auth.api +++ b/server_api/home-user-auth.api @@ -103,4 +103,29 @@ type DataUserBasicInfo { type DataGetType { Id int64 `db:"id" json:"key"` // ID Name string `db:"name" json:"name"` // 餐厅名字 +} + +// KeyName 普通的key name 对象结构. eg: /user/status-config 用在返回值 +type KeyName { + Key string `json:"key"` + Name string `json:"name"` +} + +// KeyNameButton 普通的key name button 对象结构 eg: /user/status-config 用在返回值 +type KeyNameButton { + Key string `json:"key"` + Name string `json:"name"` + Button []string `json:"button"` +} + +// DataStatusConfig /user/status-config 返回值data结构 +type DataStatusConfig { + SearchList []KeyName `json:"search_list"` //搜索下拉列表 + OrderStatus []KeyNameButton `json:"order_status"` //直邮单状态 + InventoryStatus []KeyNameButton `json:"Inventory_status"` //云仓单状态 + OrderLogisticsStatus []KeyName `json:"order_logistics_status"` //订单物流状态 + InventoryLogisticsStatus []KeyName `json:"Inventory_logistics_status"` //订单物流状态 + Time []KeyName `json:"time"` //返回订单时间筛选项 + RefundReason []KeyName `json:"refund_reason"` //退款原因说明项 + LogisticsStatus []KeyName `json:"logistics_status"` //物流状态筛选项 } \ No newline at end of file