Browse Source

修改url

yjp 1 year ago
parent
commit
aab5069161

+ 1 - 0
project/gateway/api/v1/example/class.go

@@ -8,6 +8,7 @@ import (
 func classGateway(builder *gateway.Builder) {
 	entity_crud.BindSimple(builder, &entity_crud.Simple{
 		ServiceVersionedUrl: serviceVersionedUrl,
+		ServiceShortName:    "example",
 		DomainCamelName:     "Class",
 	})
 }

+ 1 - 0
project/gateway/api/v1/example/class_and_student.go

@@ -8,6 +8,7 @@ import (
 func classAndStudentGateway(builder *gateway.Builder) {
 	one2many.BindSimple(builder, &one2many.Simple{
 		ServiceVersionedUrl:  serviceVersionedUrl,
+		ServiceShortName:     "example",
 		LeftDomainCamelName:  "Class",
 		RightDomainCamelName: "Student",
 	})

+ 1 - 0
project/gateway/api/v1/example/family.go

@@ -8,6 +8,7 @@ import (
 func familyGateway(builder *gateway.Builder) {
 	entity_crud.BindSimple(builder, &entity_crud.Simple{
 		ServiceVersionedUrl: serviceVersionedUrl,
+		ServiceShortName:    "example",
 		DomainCamelName:     "Family",
 	})
 }

+ 1 - 0
project/gateway/api/v1/example/identity.go

@@ -8,6 +8,7 @@ import (
 func identityGateway(builder *gateway.Builder) {
 	entity_crud.BindSimple(builder, &entity_crud.Simple{
 		ServiceVersionedUrl: serviceVersionedUrl,
+		ServiceShortName:    "example",
 		DomainCamelName:     "Identity",
 	})
 }

+ 1 - 0
project/gateway/api/v1/example/student.go

@@ -8,6 +8,7 @@ import (
 func studentGateway(builder *gateway.Builder) {
 	entity_crud.BindSimple(builder, &entity_crud.Simple{
 		ServiceVersionedUrl: serviceVersionedUrl,
+		ServiceShortName:    "example",
 		DomainCamelName:     "Student",
 	})
 }

+ 1 - 0
project/gateway/api/v1/example/student_and_family.go

@@ -8,6 +8,7 @@ import (
 func studentAndFamilyGateway(builder *gateway.Builder) {
 	one2one.BindSimple(builder, &one2one.Simple{
 		ServiceVersionedUrl:  serviceVersionedUrl,
+		ServiceShortName:     "example",
 		LeftDomainCamelName:  "Student",
 		RightDomainCamelName: "Family",
 	})

+ 1 - 0
project/gateway/api/v1/example/student_and_hobby.go

@@ -8,6 +8,7 @@ import (
 func studentAndHobbyGateway(builder *gateway.Builder) {
 	many2many.BindSimple(builder, &many2many.Simple{
 		ServiceVersionedUrl:  serviceVersionedUrl,
+		ServiceShortName:     "example",
 		LeftDomainCamelName:  "Student",
 		RightDomainCamelName: "Hobby",
 	})

+ 1 - 0
project/gateway/api/v1/example/student_and_identity.go

@@ -8,6 +8,7 @@ import (
 func studentAndIdentityGateway(builder *gateway.Builder) {
 	many2many.BindSimple(builder, &many2many.Simple{
 		ServiceVersionedUrl:  serviceVersionedUrl,
+		ServiceShortName:     "example",
 		LeftDomainCamelName:  "Student",
 		RightDomainCamelName: "Identity",
 	})

+ 39 - 39
project/gateway/main.go

@@ -16,67 +16,67 @@ import (
 // curl -X GET "http://localhost:32000/gateway/api/configuration/registered/services"
 
 // Class
-// curl -X POST -H "Content-Type: application/json" -d '{"name":"test", "studentNum": 10}' "http://localhost:32000/gateway/api/v1/class/create"
-// curl -X PUT -H "Content-Type: application/json" -d '{"id":"1a6103829c7142d49a81106815b11319", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/class/update"
-// curl -X GET "http://localhost:32000/gateway/api/v1/class/query?name=test-new&pageNo=1&pageSize=1"
-// curl -X GET "http://localhost:32000/gateway/api/v1/class/get?id=1a6103829c7142d49a81106815b11319"
-// curl -X DELETE "http://localhost:32000/gateway/api/v1/class/delete?id=1a6103829c7142d49a81106815b11319"
+// curl -X POST -H "Content-Type: application/json" -d '{"name":"test", "studentNum": 10}' "http://localhost:32000/gateway/api/v1/example/class/create"
+// curl -X PUT -H "Content-Type: application/json" -d '{"id":"1a6103829c7142d49a81106815b11319", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/example/class/update"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/class/query?name=test-new&pageNo=1&pageSize=1"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/class/get?id=1a6103829c7142d49a81106815b11319"
+// curl -X DELETE "http://localhost:32000/gateway/api/v1/example/class/delete?id=1a6103829c7142d49a81106815b11319"
 
 // Student
-// curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' "http://localhost:32000/gateway/api/v1/student/create"
-// curl -X PUT -H "Content-Type: application/json" -d '{"id":"bdd469c05e244b5b91b17295a8dd221f", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/student/update"
-// curl -X GET "http://localhost:32000/gateway/api/v1/student/query?name=test-new&pageNo=1&pageSize=1"
-// curl -X GET "http://localhost:32000/gateway/api/v1/student/get?id=bdd469c05e244b5b91b17295a8dd221f"
-// curl -X DELETE "http://localhost:32000/gateway/api/v1/student/delete?id=bdd469c05e244b5b91b17295a8dd221f"
+// curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' "http://localhost:32000/gateway/api/v1/example/student/create"
+// curl -X PUT -H "Content-Type: application/json" -d '{"id":"bdd469c05e244b5b91b17295a8dd221f", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/example/student/update"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/student/query?name=test-new&pageNo=1&pageSize=1"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/student/get?id=bdd469c05e244b5b91b17295a8dd221f"
+// curl -X DELETE "http://localhost:32000/gateway/api/v1/example/student/delete?id=bdd469c05e244b5b91b17295a8dd221f"
 
 // Family
-// curl -X POST -H "Content-Type: application/json" -d '{"father":"father", "mother": "mother"}' "http://localhost:32000/gateway/api/v1/family/create"
-// curl -X PUT -H "Content-Type: application/json" -d '{"id":"094cb5b08a244163b0ccf02d45c07025", "father":"new-father", "mother": "new-mother"}' "http://localhost:32000/gateway/api/v1/family/update"
-// curl -X GET "http://localhost:32000/gateway/api/v1/family/query?father=new-father&pageNo=0&pageSize=0"
-// curl -X GET "http://localhost:32000/gateway/api/v1/family/get?id=094cb5b08a244163b0ccf02d45c07025"
-// curl -X DELETE "http://localhost:32000/gateway/api/v1/family/delete?id=094cb5b08a244163b0ccf02d45c07025"
+// curl -X POST -H "Content-Type: application/json" -d '{"father":"father", "mother": "mother"}' "http://localhost:32000/gateway/api/v1/example/family/create"
+// curl -X PUT -H "Content-Type: application/json" -d '{"id":"094cb5b08a244163b0ccf02d45c07025", "father":"new-father", "mother": "new-mother"}' "http://localhost:32000/gateway/api/v1/example/family/update"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/family/query?father=new-father&pageNo=0&pageSize=0"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/family/get?id=094cb5b08a244163b0ccf02d45c07025"
+// curl -X DELETE "http://localhost:32000/gateway/api/v1/example/family/delete?id=094cb5b08a244163b0ccf02d45c07025"
 
 // Identity
-// curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' "http://localhost:32000/gateway/api/v1/identity/create"
-// curl -X PUT -H "Content-Type: application/json" -d '{"id":"cc591981a91c412a9e20be5eec683121", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/identity/update"
-// curl -X GET "http://localhost:32000/gateway/api/v1/identity/query?name=test-new&pageNo=1&pageSize=1"
-// curl -X GET "http://localhost:32000/gateway/api/v1/identity/get?id=cc591981a91c412a9e20be5eec683121"
-// curl -X DELETE "http://localhost:32000/gateway/api/v1/identity/delete?id=cc591981a91c412a9e20be5eec683121"
+// curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' "http://localhost:32000/gateway/api/v1/example/identity/create"
+// curl -X PUT -H "Content-Type: application/json" -d '{"id":"cc591981a91c412a9e20be5eec683121", "name":"test-new"}' "http://localhost:32000/gateway/api/v1/example/identity/update"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/identity/query?name=test-new&pageNo=1&pageSize=1"
+// curl -X GET "http://localhost:32000/gateway/api/v1/example/identity/get?id=cc591981a91c412a9e20be5eec683121"
+// curl -X DELETE "http://localhost:32000/gateway/api/v1/example/identity/delete?id=cc591981a91c412a9e20be5eec683121"
 
 // Class-Student
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"11d1ecf2795244af89d0b13c606f2396", "studentIds": ["4340e46e439e410fa3b0569e15354da6"]}' "http://localhost:31000/example/api/v1/class/student/update"
-// curl -X GET "http://localhost:31000/example/api/v1/class/student/query?id=11d1ecf2795244af89d0b13c606f2396"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"11d1ecf2795244af89d0b13c606f2396", "studentIds": ["4340e46e439e410fa3b0569e15354da6"]}' "http://localhost:31000/example/api/v1/example/class/student/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/class/student/query?id=11d1ecf2795244af89d0b13c606f2396"
 
 // Student-Class
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "classId": "11d1ecf2795244af89d0b13c606f2396"}' "http://localhost:31000/example/api/v1/student/class/update"
-// curl -X GET "http://localhost:31000/example/api/v1/student/class/query?id=4340e46e439e410fa3b0569e15354da6"
-// curl -X GET "http://localhost:31000/example/api/v1/student/class/queryWith?name=test"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "classId": "11d1ecf2795244af89d0b13c606f2396"}' "http://localhost:31000/example/api/v1/example/student/class/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/student/class/query?id=4340e46e439e410fa3b0569e15354da6"
+// curl -X GET "http://localhost:31000/example/api/v1/example/student/class/queryWith?name=test"
 
 // Student-Family
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "familyId": "6d15704c1cac42788aa9866cc5d09649"}' "http://localhost:31000/example/api/v1/student/family/update"
-// curl -X GET "http://localhost:31000/example/api/v1/student/family/query?id=4340e46e439e410fa3b0569e15354da6"
-// curl -X GET "http://localhost:31000/example/api/v1/student/family/queryWith?name=test"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "familyId": "6d15704c1cac42788aa9866cc5d09649"}' "http://localhost:31000/example/api/v1/example/student/family/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/student/family/query?id=4340e46e439e410fa3b0569e15354da6"
+// curl -X GET "http://localhost:31000/example/api/v1/example/student/family/queryWith?name=test"
 
 // Family-Student
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"6d15704c1cac42788aa9866cc5d09649", "studentId": "4340e46e439e410fa3b0569e15354da6"}' "http://localhost:31000/example/api/v1/family/student/update"
-// curl -X GET "http://localhost:31000/example/api/v1/family/student/query?id=6d15704c1cac42788aa9866cc5d09649"
-// curl -X GET "http://localhost:31000/example/api/v1/family/student/queryWith?father=father"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"6d15704c1cac42788aa9866cc5d09649", "studentId": "4340e46e439e410fa3b0569e15354da6"}' "http://localhost:31000/example/api/v1/example/family/student/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/family/student/query?id=6d15704c1cac42788aa9866cc5d09649"
+// curl -X GET "http://localhost:31000/example/api/v1/example/family/student/queryWith?father=father"
 
 // Student-Identity
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "identityIds": ["1988069accce47f58679d7a46ce605c3"]}' "http://localhost:31000/example/api/v1/student/identity/update"
-// curl -X GET "http://localhost:31000/example/api/v1/student/identity/query?id=4340e46e439e410fa3b0569e15354da6"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "identityIds": ["1988069accce47f58679d7a46ce605c3"]}' "http://localhost:31000/example/api/v1/example/student/identity/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/student/identity/query?id=4340e46e439e410fa3b0569e15354da6"
 
 // Identity-Student
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"1988069accce47f58679d7a46ce605c3", "studentIds": ["4340e46e439e410fa3b0569e15354da6"]}' "http://localhost:31000/example/api/v1/identity/student/update"
-// curl -X GET "http://localhost:31000/example/api/v1/identity/student/query?id=1988069accce47f58679d7a46ce605c3"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"1988069accce47f58679d7a46ce605c3", "studentIds": ["4340e46e439e410fa3b0569e15354da6"]}' "http://localhost:31000/example/api/v1/example/identity/student/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/identity/student/query?id=1988069accce47f58679d7a46ce605c3"
 
 // Student-Hobby
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "hobbyIds": ["42b305bb292c4082a3e91a2967f11111"]}' "http://localhost:31000/example/api/v1/student/hobby/update"
-// curl -X GET "http://localhost:31000/example/api/v1/student/hobby/query?id=4340e46e439e410fa3b0569e15354da6"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"4340e46e439e410fa3b0569e15354da6", "hobbyIds": ["42b305bb292c4082a3e91a2967f11111"]}' "http://localhost:31000/example/api/v1/example/student/hobby/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/student/hobby/query?id=4340e46e439e410fa3b0569e15354da6"
 
 // Hobby-Student
-// curl -X POST -H "Content-Type: application/json" -d '{"id":"42b305bb292c4082a3e91a2967f11111", "studentIds": ["4340e46e439e410fa3b0569e15354da6"]}' "http://localhost:31000/example/api/v1/hobby/student/update"
-// curl -X GET "http://localhost:31000/example/api/v1/hobby/student/query?id=42b305bb292c4082a3e91a2967f11111"
+// curl -X POST -H "Content-Type: application/json" -d '{"id":"42b305bb292c4082a3e91a2967f11111", "studentIds": ["4340e46e439e410fa3b0569e15354da6"]}' "http://localhost:31000/example/api/v1/example/hobby/student/update"
+// curl -X GET "http://localhost:31000/example/api/v1/example/hobby/student/query?id=42b305bb292c4082a3e91a2967f11111"
 
 // Sql Executor
 // curl -X POST -H 'Content-Type: application/json' -d '{"serviceShortName": "example", "sql": "SELECT * FROM test.sql_execute_logs", "executorId": "guest-00254b4a7102429db35e6edc8e"}' "http://localhost:32000/gateway/api/sql/execute"