소스 검색

添加例子

yjp 9 달 전
부모
커밋
511edaf26c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      project/server/main.go

+ 1 - 0
project/server/main.go

@@ -27,6 +27,7 @@ import (
 // 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 POST -H "Content-Type: application/json" -d '{"pageNo":1, "pageSize":1, "rule": "{\"fieldName\": \"Name\", \"fieldType\": \"string\", \"operator\": \"contains\", \"value\": \"tes\"}"}' "http://localhost:31000/example/api/v1/student/advancedQuery"
+// 更复杂的高级查询 curl -X POST -H "Content-Type: application/json" -d '{"pageNo":1, "pageSize":1, "rule": "{\"logicalOperator\": \"or\", \"left\": {\"fieldName\": \"Name\", \"fieldType\": \"string\", \"operator\": \"eq\", \"value\": \"a\"}, \"right\": {\"fieldName\": \"Name\", \"fieldType\": \"string\", \"operator\": \"contains\", \"value\": \"tes\"}}"}' "http://localhost:31000/example/api/v1/student/advancedQuery"
 // 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