From e52dbd2cfdd74040c012c70a1253b9031a085662 Mon Sep 17 00:00:00 2001 From: cheliequan <liequanche@126.com> Date: 星期一, 16 一月 2023 19:49:33 +0800 Subject: [PATCH] 优化接口支持json是数组格式 --- rule.cpp | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/rule.cpp b/rule.cpp index 9215e4a..060cc21 100644 --- a/rule.cpp +++ b/rule.cpp @@ -14,11 +14,9 @@ bool dbapi_get_dayctls(char *timeRules, std::vector<protomsg::DayCtl> & list) { - const char * flag_key = NULL; + bool is_array = true; - const char * data_key = "time_rule"; - - bool ret = bus_dbapi_get_list(timeRules, flag_key, data_key, list); + bool ret = bus_dbapi_get_list(timeRules, is_array, list); return ret; @@ -28,7 +26,7 @@ { const char * flag_key = NULL; - const char * data_key = "time_range"; + const char * data_key = NULL; bool ret = bus_dbapi_get_list(datactls, flag_key, data_key, list); -- Gitblit v1.8.0