소스 검색

修改demo

yjp 1 년 전
부모
커밋
faa28acd26
2개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 3
      project/server/application/service/student.go
  2. 0 1
      project/server/main.go

+ 2 - 3
project/server/application/service/student.go

@@ -42,12 +42,11 @@ func (svc *StudentService) v1(appInstance *application.App) {
 		CreateJsonBody:     &student.CreateStudentJsonBody{},
 		DeleteQueryParams:  &student.DeleteStudentQueryParams{},
 		UpdateJsonBody:     &student.UpdateStudentJsonBody{},
-		QueryQueryParams:   &student.GetStudentsQueryParams{},
 		GetByIDQueryParams: &student.GetStudentByIDQueryParams{},
-	})
+	}, entity_crud.WithDisableQuery[student.Info]())
 
 	binding.GetBind(v1Binder, &binding.SimpleBindItem[response.InfosData[student.Info]]{
-		Path:             "/student/query/withRule",
+		Path:             "/student/query",
 		SendResponseFunc: response.SendInfosResponse[student.Info],
 		RequestParams:    &student.GetStudentsQueryParams{},
 		Objects:          []domain.Object{&student.Entity{}},

+ 0 - 1
project/server/main.go

@@ -26,7 +26,6 @@ import (
 // curl -X POST -H "Content-Type: application/json" -d '{"name":"test"}' "http://localhost:31000/example/api/v1/student/create"
 // curl -X PUT -H "Content-Type: application/json" -d '{"id":"d9332801b46c4f0c99fdd381954313d6", "name":"test-new"}' "http://localhost:31000/example/api/v1/student/update"
 // curl -X GET "http://localhost:31000/example/api/v1/student/query?name=test-new&pageNo=1&pageSize=1"
-// curl -X GET "http://localhost:31000/example/api/v1/student/query/withRule?pageNo=1&pageSize=1"
 // curl -X GET "http://localhost:31000/example/api/v1/student/get?id=d9332801b46c4f0c99fdd381954313d6"
 // curl -X DELETE "http://localhost:31000/example/api/v1/student/delete?id=d9332801b46c4f0c99fdd381954313d6"