Kaynağa Gözat

V0.8.6
1、需改了lhhttpapy文件

Apple 3 ay önce
ebeveyn
işleme
a4a44be90a

+ 1 - 1
Libraries/LHHTTPAPI/src/lhhttpapi.cpp

@@ -284,7 +284,7 @@ int lhhttpapi::DBDoInterface( int nOperatorType, const QString &strParamXml, QSt
         //char buffer[LHHTTPAPI_BUFFER_SIZE] = {0};
         char *buffer = new char[LHHTTPAPI_BUFFER_SIZE]{0};
         // memset(buffer, 0, LHHTTPAPI_BUFFER_SIZE);
-        int ret = fnDBDoInterface(serid.toUtf8().data(), appType.toUtf8().data(), strToken.toUtf8().data(), nOperatorType, strParamXml.toUtf8().data(), buffer, LHHTTPAPI_BUFFER_SIZE,bismulti,phttpip);
+        int ret = fnDBDoInterface(serid.toUtf8().data(), appType.toUtf8().data(), strToken.toUtf8().data(), nOperatorType, strParamXml.toUtf8().data(), buffer, LHHTTPAPI_BUFFER_SIZE - 1,bismulti,phttpip);
         strRetXml = QString::fromUtf8(buffer);
         delete [] buffer;
         return ret;

+ 22 - 0
Libraries/LHHTTPAPI/src/lhhttpapi.h

@@ -24,6 +24,28 @@ enum enDBOperatorType
     EDBOT_Delete,
     EDBOT_Insert,
     EDBOT_Procedure,
+    EDBOT_Batch,            /* 单动作批量操作,失败全部回滚 */
+    EDBOT_BatchTransAction  /* 多动作批量操作,失败回滚,请求[{op1}, {op2}, ...],
+                                回复
+                                {
+                                    "code":0,
+                                    "data":[{
+                                        "key":"1",
+                                        "value":{
+                                            "code":0,
+                                            "result":1
+                                        }
+                                    },
+                                    {
+                                        "key":"2",
+                                        "value":{
+                                            "code":0,
+                                            "result":[{
+                                                "counT(*)":0
+                                            }]
+                                        }
+                                    }]
+                                }" */
 };