From a89689b92b07cf1830ad8b46521eda92e7f927c0 Mon Sep 17 00:00:00 2001
From: pansen <pansen626@sina.com>
Date: 星期三, 30 一月 2019 16:37:45 +0800
Subject: [PATCH] 修改bug

---
 QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp b/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
index d59bc75..7495c9d 100644
--- a/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
+++ b/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
@@ -204,6 +204,9 @@
      * @return sql
      */
     std::string getInitDBSql() {
+//        %%      ALTER TABLE sys_o_tables ADD COLUMN uploadFlag varchar(255) DEFAULT 0;
+//        %%      ALTER TABLE sys_o_tables ADD COLUMN cmpThreshold varchar(255) DEFAULT 60;
+//        %%      ALTER TABLE sys_o_tables ADD COLUMN enabled varchar(255) DEFAULT 1;
         std::string sql = "CREATE TABLE \"main\".\"sys_o_tables\" (";
         sql.append(" uuid        varchar(255) PRIMARY KEY, ");
 //        sql.append(" ClusterName varchar(255) DEFAULT NULL,");//鏈湴搴撲笉闇�瑕�
@@ -284,6 +287,9 @@
         std::string sql = "update '";
         sql.append(tableName + "' set ");
         for (auto &item :fieldValues) {
+            if (item.second.size() == 0) {
+                continue;
+            }
             sql.append(item.first + " =  '" + item.second + "',");
         }
         sql.append(" update_time ='" + AppUtil::getTimeSecString() + "'");

--
Gitblit v1.8.0