From cdad9266d0496ae413afd71a095e1b927d4d7bbd Mon Sep 17 00:00:00 2001 From: hugh Date: Mon, 26 Apr 2021 10:35:40 +0800 Subject: [PATCH] =?UTF-8?q?readme=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b329a0..96a39d8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,57 @@ # demo-db-access-provider -持久化接口demo \ No newline at end of file +持久化接口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,一些方法调用还不行,等产品修复后再测 + + +