diff --git a/dbaccess/sql_db.cpp b/dbaccess/sql_db.cpp index e2caee1..c160363 100644 --- a/dbaccess/sql_db.cpp +++ b/dbaccess/sql_db.cpp @@ -1567,6 +1567,12 @@ void SqliteDB::NewBatteryIdentify(){ } } void SqliteDB::ShutdownCheck(){ + int shutdownDetection = readIntValue("config", "shutdownDetection", (char *)GlobalConfig::Config_G.c_str()); + if (!shutdownDetection) + { + return ; + } + int checkNumber = readIntValue("config", "shutdownNumber", (char *)GlobalConfig::Config_G.c_str()); char whereCon[1024] = {0}; char updateSql[1024] = {0}; diff --git a/jsonparse/web_cmd_parse3.cpp b/jsonparse/web_cmd_parse3.cpp index e736fa2..8573a8a 100644 --- a/jsonparse/web_cmd_parse3.cpp +++ b/jsonparse/web_cmd_parse3.cpp @@ -1524,7 +1524,7 @@ std::string JsonData::JsonCmd_Cgi_68(Param_68 ¶m){ memset(whereCon,0,sizeof(whereCon)); memset(updateSql,0,sizeof(updateSql)); sprintf(whereCon, " MeasurementID = '%s' ", param.vecParam68[i].measurementID.c_str()); - sprintf(updateSql, " status = '%d',statisticType = '%d', threshold = '%f'",param.vecParam68[i].status,param.vecParam68[i].statisticType,param.vecParam68[i].threshold); + sprintf(updateSql, " status = '%d',statisticType = '%d', threshold = '%f',effect = '0' ",param.vecParam68[i].status,param.vecParam68[i].statisticType,param.vecParam68[i].threshold); sqlite_db_ctrl::instance().UpdateTableData(" t_shutdown_info ", updateSql, whereCon); } } @@ -1580,7 +1580,7 @@ std::string JsonData::JsonCmd_Cgi_69(Param_69 ¶m){ memset(whereCon,0,sizeof(whereCon)); memset(updateSql,0,sizeof(updateSql)); sprintf(whereCon, " MeasurementID = '%s' ", param.vecParam69[i].measurementID.c_str()); - sprintf(updateSql, " status = '%d',trigerType = '%d',statisticType = '%d', threshold = '%f'",param.vecParam69[i].status,param.vecParam69[i].trigerType,param.vecParam69[i].statisticType,param.vecParam69[i].threshold); + sprintf(updateSql, " status = '%d',trigerType = '%d',statisticType = '%d', threshold = '%f' , effect = '0'",param.vecParam69[i].status,param.vecParam69[i].trigerType,param.vecParam69[i].statisticType,param.vecParam69[i].threshold); sqlite_db_ctrl::instance().UpdateTableData(" t_wave_triger_info ", updateSql, whereCon); } }