hugh
4 years ago
1 changed files with 55 additions and 1 deletions
@ -1,3 +1,57 @@
|
||||
# demo-db-access-provider |
||||
|
||||
持久化接口demo |
||||
持久化接口demo\ |
||||
POST http://localhost:8075/webroot/decision/db/demo/dm_entity\ |
||||
BODY ROW JSON :\ |
||||
{\ |
||||
"key":"qwe4",\ |
||||
"bean":{\ |
||||
"attr1":"v1",\ |
||||
"attr2":"v7"\ |
||||
},\ |
||||
"attr3":[\ |
||||
{"attr2":"v3"},\ |
||||
{"attr2":"v4"},\ |
||||
{"attr2":"v5"}\ |
||||
]\ |
||||
}\ |
||||
响应是body的JSON带上id之后的JSON,实现了添加\ |
||||
\ |
||||
GET http://localhost:8075/webroot/decision/db/demo/dm_entity?key=qwe\ |
||||
响应是所有key like 参数中的key的对象JSON\ |
||||
\ |
||||
PUT http://localhost:8075/webroot/decision/db/demo/dm_entity\ |
||||
BODY ROW JSON"{\ |
||||
"id": "2e3ae257-2d73-401d-9c3f-d1f24c1cf1b6",\ |
||||
"key": "qwe2",\ |
||||
"bean": {\ |
||||
"attr1": "v1",\ |
||||
"attr2": "v2"\ |
||||
},\ |
||||
"attr3": [\ |
||||
{\ |
||||
"attr1": "e59683f0-03f7-4919-8c9a-2bac80d2d28f",\ |
||||
"attr2": "v7"\ |
||||
},\ |
||||
{\ |
||||
"attr2": "v8"\ |
||||
},\ |
||||
{\ |
||||
"attr1": "13f2ba76-0384-4589-95de-380d1e50d377",\ |
||||
"attr2": "v4"\ |
||||
},\ |
||||
{\ |
||||
"attr1": "301ed740-9b32-4e0e-a93e-fa525289d2f5",\ |
||||
"attr2": "v5"\ |
||||
}\ |
||||
]\ |
||||
}\ |
||||
上面的JSON对象就是第一个post添加的对象的修改,除了ID和attr1其他所有值都可以改\ |
||||
|
||||
DELETE http://localhost:8075/webroot/decision/db/demo/dm_entity/{ID}\ |
||||
删除创建的对象,ID就是创建时得到的ID。\ |
||||
数据在:plugin_demo 和 plugin_demo_link 两张表中\ |
||||
注:当前产品还有BUG,一些方法调用还不行,等产品修复后再测 |
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue