|
|
@@ -26,8 +26,10 @@ 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 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 POST -H "Content-Type: application/json" -d '{"rule": "{\"fieldName\": \"Name\", \"fieldType\": \"string\", \"operator\": \"contains\", \"value\": \"tes\"}"}' "http://localhost:31000/example/api/v1/student/queryRule/parse"
|
|
|
+// curl -X POST -H "Content-Type: application/json" -d '{"pageNo":1, "pageSize":1, "ruleClause":"\"name\" LIKE ?","ruleClauseArgs":["%tes%"]}' "http://localhost:31000/example/api/v1/student/advancedQuery"
|
|
|
+// 复杂查询 curl -X POST -H "Content-Type: application/json" -d '{"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/queryRule/parse"
|
|
|
+// 复杂查询 curl -X POST -H "Content-Type: application/json" -d '{"pageNo":1, "pageSize":1, "ruleClause":"(\"name\" = ?) OR (\"name\" LIKE ?)","ruleClauseArgs":["a","%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
|
|
|
|