diff --git a/src/database/Dao.cpp b/src/database/Dao.cpp index da0914c..ae202e5 100644 --- a/src/database/Dao.cpp +++ b/src/database/Dao.cpp @@ -469,7 +469,7 @@ Errcode DAO::updateDeviceById(Fields& params) // 策略管理 Errcode DAO::queryPolicyList(PageInfo& pageInfo, vector& result) { - std::string sqlFrom = "FROM " + DMPolicy::TABLENAME; + std::string sqlFrom = "FROM " + DMPolicy::TABLENAME + " WHERE is_del != '1'"; return QueryPagination("*", sqlFrom, pageInfo, result); } diff --git a/src/protocol/HttpEntity.cpp b/src/protocol/HttpEntity.cpp index dc25137..116d8c9 100644 --- a/src/protocol/HttpEntity.cpp +++ b/src/protocol/HttpEntity.cpp @@ -1949,10 +1949,10 @@ Errcode HttpEntity::queryEGridPeriod(const httplib::Request& req, njson& json, s { int etype = item.get("etype"); float price = item.get("price", 2); - if (etype == 1) { priceJ = price; } - else if (etype == 2) { priceF = price; } - else if (etype == 3) { priceP = price; } - else if (etype == 4) { priceG = price; } + if (etype == 1) { priceG = price; } + else if (etype == 2) { priceP = price; } + else if (etype == 3) { priceF = price; } + else if (etype == 4) { priceJ = price; } else if (etype == 9) { priceC = price; } } }