feiyu02
2025-09-01 29383149f7040d89ae00ad48dc48bbcf46587946
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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.flightfeather.uav.domain.mapper.GridDataDetailMapper">
  <resultMap id="BaseResultMap" type="com.flightfeather.uav.domain.entity.GridDataDetail">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="data_id" jdbcType="INTEGER" property="dataId" />
    <result column="group_id" jdbcType="INTEGER" property="groupId" />
    <result column="cell_id" jdbcType="INTEGER" property="cellId" />
    <result column="rank" jdbcType="INTEGER" property="rank" />
    <result column="NO2" jdbcType="REAL" property="no2" />
    <result column="CO" jdbcType="REAL" property="co" />
    <result column="H2S" jdbcType="REAL" property="h2s" />
    <result column="SO2" jdbcType="REAL" property="so2" />
    <result column="O3" jdbcType="REAL" property="o3" />
    <result column="PM25" jdbcType="REAL" property="pm25" />
    <result column="PM10" jdbcType="REAL" property="pm10" />
    <result column="temperature" jdbcType="REAL" property="temperature" />
    <result column="humidity" jdbcType="REAL" property="humidity" />
    <result column="VOC" jdbcType="REAL" property="voc" />
    <result column="NOI" jdbcType="REAL" property="noi" />
    <result column="NO" jdbcType="REAL" property="no" />
    <result column="wind_speed" jdbcType="REAL" property="windSpeed" />
    <result column="wind_direction" jdbcType="REAL" property="windDirection" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, data_id, group_id, cell_id, rank, NO2, CO, H2S, SO2, O3, PM25, PM10, temperature, 
    humidity, VOC, NOI, NO, wind_speed, wind_direction
  </sql>
 
  <!-- 添加批量更新PM25的函数 -->
  <update id="updatePM25Batch" parameterType="java.util.List">
    <foreach collection="list" item="item" separator=";">
      UPDATE grid_data_detail
      SET PM25 = #{item.pm25}
      WHERE data_id = #{item.dataId}
      AND group_id = #{item.groupId}
      AND cell_id = #{item.cellId}
    </foreach>
  </update>
</mapper>