明树Git Lab

Commit 1520c23b authored by zengfanpei's avatar zengfanpei

update

parent d8c636d6
......@@ -139,9 +139,9 @@ async function getWSChangeTrend(req, res, next) {
{
$group: {
_id: { $dateToString: { format: "%Y-%m-%d", date: "$time" } }, // 将时间戳转换为日期字符串
wsTemperature: { $avg: "$wsTemperature" },
wsMoisture: { $avg: "$wsMoisture" },
rainfall: { $avg: "$rainfall" },
wsTemperature: {$round: [{ $avg: "$wsTemperature" }, 2]},
wsMoisture: {$round: [{ $avg: "$wsMoisture" }, 2]},
rainfall: {$round: [{ $avg: "$rainfall" }, 2]},
}
},
{ $sort: { _id: 1 } }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment