From efafab5273ba3ff13a19f07088c320a5180188b6 Mon Sep 17 00:00:00 2001
From: pans <pansen626@sina.com>
Date: 星期四, 31 一月 2019 10:49:56 +0800
Subject: [PATCH] 1.2_布控feature: Auto stash before merge of "ywv1.2_布控feature" and "origin/ywv1.2_布控feature"

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

diff --git a/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp b/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
index 38f2ea8..7495c9d 100644
--- a/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
+++ b/QiaoJiaSystem/LocalDBTool/SqliteToolkit.hpp
@@ -69,6 +69,7 @@
     std::string faceurl;
     FaceFeature faceFeature;
     std::string enable;
+    std::string monLevel;
 };
 
 typedef std::map<std::string, FaceFeatureWithUrl> FeatureDBWithUrlCache;
@@ -91,7 +92,7 @@
     std::string getFacesFromTableSql(std::string tableName) {
 //        #todo get monLevel 鑱斿悎鏌ヨ
         std::string sql =
-            "select uuid,feature,create_time,faceUrl,del_flag,enabled from '" + tableName +
+            "select uuid,feature,create_time,faceUrl,del_flag from '" + tableName +
             "_fea' where feature is not null ";
         return sql;
     }
@@ -203,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,");//鏈湴搴撲笉闇�瑕�
@@ -283,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