URL: data/query
Method:POST
Content-Type:application/json
{
"query": {
"key": {
"key": "id",
"operator": "=",
"value": 5
},
"operator": "or",
"value": {
"key": {
"key": "name",
"operator": "=",
"value": "abc"
},
"operator": "and",
"value": {
"key": "name",
"operator": "like",
"value": "%abc%"
}
}
},
"orderby": {
"id": "desc",
"name": "asc"
},
"page": {
"pagenum": 1,
"pagesize": 20
},
"templete": "SELECT * FROM department"
}
{
"param": {
"orgcode": "000002"
},
"orderby": {
"id": "desc",
"name": "asc"
},
"page": {
"pagenum": 1,
"pagesize": 20
},
"templete": "SELECT * FROM department where orgcode=@orgcode"
}
URL: data/
Method:POST
Content-Type:application/json
{
"grp_userprofile": {
"guid": "%user.guid%",
"name": "%user.name%",
"create_time": "{{date}}",
"age": 35,
"discount": 0.8,
"isdelete": true
},
"sys_user": [{
"guid": "%user.guid%",
"name": "张三",
"create_time": "{{datetime}}",
"age": 31,
"discount": 0.9,
"isdelete": true
}, {
"guid": "%user.guid%",
"name": "李四",
"create_time": "2018-03-14T15:32:44",
"age": 33,
"discount": 0.9,
"isdelete": true
}],
"$data": {
"user": {
"name": "王五",
"guid": "{{guid}}"
}
}
}
URL: data/
Method:PUT
Content-Type:application/json
{
"grp_userprofile": {
"name": "%user.name%",
"create_time": "{{date}}",
"age": 25,
"discount": 0.8,
"isdelete": true,
"$key": {
"guid": "%user.guid%"
}
},
"sys_user": [{
"name": "张三",
"create_time": "{{datetime}}",
"age": 21,
"discount": 0.9,
"isdelete": true,
"$key": {
"guid": "%user.guid2%"
}
}, {
"name": "李四",
"create_time": "2018-03-14T15:32:44",
"age": 23,
"discount": 0.9,
"isdelete": true,
"$key": {
"guid": "%user.guid%"
}
}],
"$data": {
"user": {
"name": "王五",
"guid": "92536796f03f4084926e391776f79a63",
"guid2":"47d69f5e489f44797120826c0c6ef31e"
}
}
}
URL: data/{tablename}/{key}/{keyvalue}
Method:DELETE