空调最高峰,空调数据库挂载再优化

This commit is contained in:
2025-11-19 16:24:24 +08:00
parent 1233677eea
commit f6e7dfcd93
7 changed files with 111 additions and 34 deletions

View File

@ -1,4 +1,10 @@
-- 更新空调状态
UPDATE air_conditioner
SET "on" = ?, temperature = ?, burnt = ?, frozen = ?
WHERE id = ?;
-- 插入日志记录(从更新后的数据获取)
INSERT INTO air_conditioner_log (id, "on", temperature, burnt, frozen)
SELECT id, "on", temperature, burnt, frozen
FROM air_conditioner
WHERE id = ?;