From aa1bdb548aa6a6371a8953efacc3986300eee576 Mon Sep 17 00:00:00 2001
From: swb <jpy123456>
Date: Fri, 15 Nov 2024 08:50:23 +0800
Subject: [PATCH] fix:补充提交
---
screen-api/src/main/resources/mapper/HistoryAqiMapper.xml | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/screen-api/src/main/resources/mapper/HistoryAqiMapper.xml b/screen-api/src/main/resources/mapper/HistoryAqiMapper.xml
new file mode 100644
index 0000000..7e6f501
--- /dev/null
+++ b/screen-api/src/main/resources/mapper/HistoryAqiMapper.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.moral.api.mapper.HistoryAqiMapper">
+
+ <!-- ������������������������ -->
+ <resultMap id="BaseResultMap" type="com.moral.api.entity.HistoryAqi">
+ <result column="guid" property="guid"/>
+ <result column="time" property="time"/>
+ <result column="value" property="value"/>
+ </resultMap>
+
+
+ <select id="query" resultType="com.moral.api.pojo.dto.historyAqi.HistoryAqiDto">
+ SELECT `value` -> '$.co' as a21005,
+ `value` -> '$.o3' as a05024,
+ `value` -> '$.no2' as a21004,
+ `value` -> '$.so2' as a21026,
+ `value` -> '$.pm10' as a34002,
+ `value` -> '$.pm2_5' as a34004,
+ `value` -> '$.pubtime' as dataTime
+ FROM history_aqi where guid=#{guid} and history_aqi.time =(SELECT MAX(time) FROM history_aqi)
+ </select>
+</mapper>
+
+
--
Gitblit v1.8.0