policy数据表新增is_del字段,查询接口进行数据过滤,修改尖峰平谷价格和类型值的映射错误问题

This commit is contained in:
lixiaoyuan
2026-03-16 17:29:42 +08:00
parent 2c7246ffc1
commit f7419a63fa
2 changed files with 5 additions and 5 deletions

View File

@@ -469,7 +469,7 @@ Errcode DAO::updateDeviceById(Fields& params)
// 策略管理 // 策略管理
Errcode DAO::queryPolicyList(PageInfo& pageInfo, vector<Fields>& result) Errcode DAO::queryPolicyList(PageInfo& pageInfo, vector<Fields>& result)
{ {
std::string sqlFrom = "FROM " + DMPolicy::TABLENAME; std::string sqlFrom = "FROM " + DMPolicy::TABLENAME + " WHERE is_del != '1'";
return QueryPagination("*", sqlFrom, pageInfo, result); return QueryPagination("*", sqlFrom, pageInfo, result);
} }

View File

@@ -1949,10 +1949,10 @@ Errcode HttpEntity::queryEGridPeriod(const httplib::Request& req, njson& json, s
{ {
int etype = item.get<int>("etype"); int etype = item.get<int>("etype");
float price = item.get<float>("price", 2); float price = item.get<float>("price", 2);
if (etype == 1) { priceJ = price; } if (etype == 1) { priceG = price; }
else if (etype == 2) { priceF = price; } else if (etype == 2) { priceP = price; }
else if (etype == 3) { priceP = price; } else if (etype == 3) { priceF = price; }
else if (etype == 4) { priceG = price; } else if (etype == 4) { priceJ = price; }
else if (etype == 9) { priceC = price; } else if (etype == 9) { priceC = price; }
} }
} }