diff --git a/server/product-templatev2/etc/product-templatev2.yaml b/server/product-template/etc/product-template.yaml similarity index 87% rename from server/product-templatev2/etc/product-templatev2.yaml rename to server/product-template/etc/product-template.yaml index 16a15785..a5a69f1c 100644 --- a/server/product-templatev2/etc/product-templatev2.yaml +++ b/server/product-template/etc/product-template.yaml @@ -1,4 +1,4 @@ -Name: product-templatev2 +Name: product-template Host: 0.0.0.0 Port: 8896 SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest diff --git a/server/product-templatev2/internal/config/config.go b/server/product-template/internal/config/config.go similarity index 73% rename from server/product-templatev2/internal/config/config.go rename to server/product-template/internal/config/config.go index ccc7c293..cfb76dd9 100644 --- a/server/product-templatev2/internal/config/config.go +++ b/server/product-template/internal/config/config.go @@ -1,7 +1,7 @@ package config import ( - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/types" "github.com/zeromicro/go-zero/rest" ) diff --git a/server/product-templatev2/internal/handler/addbasemaphandler.go b/server/product-template/internal/handler/addbasemaphandler.go similarity index 86% rename from server/product-templatev2/internal/handler/addbasemaphandler.go rename to server/product-template/internal/handler/addbasemaphandler.go index 314c6e2e..74c4b06e 100644 --- a/server/product-templatev2/internal/handler/addbasemaphandler.go +++ b/server/product-template/internal/handler/addbasemaphandler.go @@ -9,9 +9,9 @@ import ( "fusenapi/utils/basic" - "fusenapi/server/product-templatev2/internal/logic" - "fusenapi/server/product-templatev2/internal/svc" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/logic" + "fusenapi/server/product-template/internal/svc" + "fusenapi/server/product-template/internal/types" ) func AddBaseMapHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/server/product-templatev2/internal/handler/getbasemaplisthandler.go b/server/product-template/internal/handler/getbasemaplisthandler.go similarity index 85% rename from server/product-templatev2/internal/handler/getbasemaplisthandler.go rename to server/product-template/internal/handler/getbasemaplisthandler.go index 1e23d005..4f57cef4 100644 --- a/server/product-templatev2/internal/handler/getbasemaplisthandler.go +++ b/server/product-template/internal/handler/getbasemaplisthandler.go @@ -7,8 +7,8 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/server/product-templatev2/internal/logic" - "fusenapi/server/product-templatev2/internal/svc" + "fusenapi/server/product-template/internal/logic" + "fusenapi/server/product-template/internal/svc" ) func GetBaseMapListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/server/product-templatev2/internal/handler/gettemplatevdetailhandler.go b/server/product-template/internal/handler/gettemplatevdetailhandler.go similarity index 86% rename from server/product-templatev2/internal/handler/gettemplatevdetailhandler.go rename to server/product-template/internal/handler/gettemplatevdetailhandler.go index cc4b07c0..716523a0 100644 --- a/server/product-templatev2/internal/handler/gettemplatevdetailhandler.go +++ b/server/product-template/internal/handler/gettemplatevdetailhandler.go @@ -9,9 +9,9 @@ import ( "fusenapi/utils/basic" - "fusenapi/server/product-templatev2/internal/logic" - "fusenapi/server/product-templatev2/internal/svc" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/logic" + "fusenapi/server/product-template/internal/svc" + "fusenapi/server/product-template/internal/types" ) func GetTemplatevDetailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/server/product-templatev2/internal/handler/routes.go b/server/product-template/internal/handler/routes.go similarity index 94% rename from server/product-templatev2/internal/handler/routes.go rename to server/product-template/internal/handler/routes.go index a91d7c77..95802ac0 100644 --- a/server/product-templatev2/internal/handler/routes.go +++ b/server/product-template/internal/handler/routes.go @@ -4,7 +4,7 @@ package handler import ( "net/http" - "fusenapi/server/product-templatev2/internal/svc" + "fusenapi/server/product-template/internal/svc" "github.com/zeromicro/go-zero/rest" ) diff --git a/server/product-templatev2/internal/handler/savebasemaphandler.go b/server/product-template/internal/handler/savebasemaphandler.go similarity index 86% rename from server/product-templatev2/internal/handler/savebasemaphandler.go rename to server/product-template/internal/handler/savebasemaphandler.go index 69f85393..1dc72d92 100644 --- a/server/product-templatev2/internal/handler/savebasemaphandler.go +++ b/server/product-template/internal/handler/savebasemaphandler.go @@ -7,8 +7,8 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/server/product-templatev2/internal/logic" - "fusenapi/server/product-templatev2/internal/svc" + "fusenapi/server/product-template/internal/logic" + "fusenapi/server/product-template/internal/svc" ) func SaveBaseMapHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/server/product-templatev2/internal/handler/updatetemplatehandler.go b/server/product-template/internal/handler/updatetemplatehandler.go similarity index 86% rename from server/product-templatev2/internal/handler/updatetemplatehandler.go rename to server/product-template/internal/handler/updatetemplatehandler.go index 2f868d9b..a95689d5 100644 --- a/server/product-templatev2/internal/handler/updatetemplatehandler.go +++ b/server/product-template/internal/handler/updatetemplatehandler.go @@ -8,9 +8,9 @@ import ( "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/rest/httpx" - "fusenapi/server/product-templatev2/internal/logic" - "fusenapi/server/product-templatev2/internal/svc" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/logic" + "fusenapi/server/product-template/internal/svc" + "fusenapi/server/product-template/internal/types" ) func UpdateTemplateHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { diff --git a/server/product-templatev2/internal/logic/addbasemaplogic.go b/server/product-template/internal/logic/addbasemaplogic.go similarity index 93% rename from server/product-templatev2/internal/logic/addbasemaplogic.go rename to server/product-template/internal/logic/addbasemaplogic.go index cd73c66c..5d1620a2 100644 --- a/server/product-templatev2/internal/logic/addbasemaplogic.go +++ b/server/product-template/internal/logic/addbasemaplogic.go @@ -11,8 +11,8 @@ import ( "context" - "fusenapi/server/product-templatev2/internal/svc" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/svc" + "fusenapi/server/product-template/internal/types" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/server/product-templatev2/internal/logic/getbasemaplistlogic.go b/server/product-template/internal/logic/getbasemaplistlogic.go similarity index 93% rename from server/product-templatev2/internal/logic/getbasemaplistlogic.go rename to server/product-template/internal/logic/getbasemaplistlogic.go index d1da6ba9..781ee56c 100644 --- a/server/product-templatev2/internal/logic/getbasemaplistlogic.go +++ b/server/product-template/internal/logic/getbasemaplistlogic.go @@ -3,7 +3,7 @@ package logic import ( "errors" "fusenapi/model/gmodel" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/types" "fusenapi/utils/basic" "gorm.io/gorm" "net/http" @@ -11,7 +11,7 @@ import ( "context" - "fusenapi/server/product-templatev2/internal/svc" + "fusenapi/server/product-template/internal/svc" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/server/product-templatev2/internal/logic/gettemplatevdetaillogic.go b/server/product-template/internal/logic/gettemplatevdetaillogic.go similarity index 98% rename from server/product-templatev2/internal/logic/gettemplatevdetaillogic.go rename to server/product-template/internal/logic/gettemplatevdetaillogic.go index 3beb2e37..5f02eb31 100644 --- a/server/product-templatev2/internal/logic/gettemplatevdetaillogic.go +++ b/server/product-template/internal/logic/gettemplatevdetaillogic.go @@ -13,8 +13,8 @@ import ( "context" - "fusenapi/server/product-templatev2/internal/svc" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/svc" + "fusenapi/server/product-template/internal/types" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/server/product-templatev2/internal/logic/savebasemaplogic.go b/server/product-template/internal/logic/savebasemaplogic.go similarity index 95% rename from server/product-templatev2/internal/logic/savebasemaplogic.go rename to server/product-template/internal/logic/savebasemaplogic.go index 9c597641..39d7ddcc 100644 --- a/server/product-templatev2/internal/logic/savebasemaplogic.go +++ b/server/product-template/internal/logic/savebasemaplogic.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fusenapi/model/gmodel" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/types" "fusenapi/utils/basic" "gorm.io/gorm" "io/ioutil" @@ -13,7 +13,7 @@ import ( "context" - "fusenapi/server/product-templatev2/internal/svc" + "fusenapi/server/product-template/internal/svc" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/server/product-templatev2/internal/logic/updatetemplatelogic.go b/server/product-template/internal/logic/updatetemplatelogic.go similarity index 96% rename from server/product-templatev2/internal/logic/updatetemplatelogic.go rename to server/product-template/internal/logic/updatetemplatelogic.go index fd1e27ab..e268e6e2 100644 --- a/server/product-templatev2/internal/logic/updatetemplatelogic.go +++ b/server/product-template/internal/logic/updatetemplatelogic.go @@ -10,8 +10,8 @@ import ( "context" - "fusenapi/server/product-templatev2/internal/svc" - "fusenapi/server/product-templatev2/internal/types" + "fusenapi/server/product-template/internal/svc" + "fusenapi/server/product-template/internal/types" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/server/product-templatev2/internal/svc/servicecontext.go b/server/product-template/internal/svc/servicecontext.go similarity index 96% rename from server/product-templatev2/internal/svc/servicecontext.go rename to server/product-template/internal/svc/servicecontext.go index 635b8dce..b2001218 100644 --- a/server/product-templatev2/internal/svc/servicecontext.go +++ b/server/product-template/internal/svc/servicecontext.go @@ -3,7 +3,7 @@ package svc import ( "errors" "fmt" - "fusenapi/server/product-templatev2/internal/config" + "fusenapi/server/product-template/internal/config" "net/http" "fusenapi/initalize" diff --git a/server/product-templatev2/internal/types/types.go b/server/product-template/internal/types/types.go similarity index 100% rename from server/product-templatev2/internal/types/types.go rename to server/product-template/internal/types/types.go diff --git a/server/product-templatev2/product-templatev2.go b/server/product-template/product-template.go similarity index 78% rename from server/product-templatev2/product-templatev2.go rename to server/product-template/product-template.go index 52faa7ac..1be70a8a 100644 --- a/server/product-templatev2/product-templatev2.go +++ b/server/product-template/product-template.go @@ -4,15 +4,15 @@ import ( "flag" "fmt" - "fusenapi/server/product-templatev2/internal/config" - "fusenapi/server/product-templatev2/internal/handler" - "fusenapi/server/product-templatev2/internal/svc" + "fusenapi/server/product-template/internal/config" + "fusenapi/server/product-template/internal/handler" + "fusenapi/server/product-template/internal/svc" "github.com/zeromicro/go-zero/core/conf" "github.com/zeromicro/go-zero/rest" ) -var configFile = flag.String("f", "etc/product-templatev2.yaml", "the config file") +var configFile = flag.String("f", "etc/product-template.yaml", "the config file") func main() { flag.Parse() diff --git a/server_api/product-templatev2.api b/server_api/product-template.api similarity index 98% rename from server_api/product-templatev2.api rename to server_api/product-template.api index 430c7348..071ecaa4 100644 --- a/server_api/product-templatev2.api +++ b/server_api/product-template.api @@ -9,7 +9,7 @@ info ( import "basic.api" -service product-templatev2 { +service product-template { //获取产品模板详情 @handler GetTemplatevDetailHandler get /product-template/detail(GetTemplatevDetailReq) returns (response);