diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/dao/mappers/GZJCDataMapper.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/dao/mappers/GZJCDataMapper.java new file mode 100644 index 0000000..fc4b676 --- /dev/null +++ b/xiuosiot-backend/src/main/java/com/aiit/xiuos/dao/mappers/GZJCDataMapper.java @@ -0,0 +1,24 @@ +package com.aiit.xiuos.dao.mappers; + +import com.aiit.xiuos.model.GZJCData; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +@Repository +public interface GZJCDataMapper { + int deleteByPrimaryKey(Integer id); + + int insert(GZJCData record); + + int insertSelective(GZJCData record); + + GZJCData selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(GZJCData record); + + int updateByPrimaryKey(GZJCData record); + + + @Select("select * from haier_data order by time desc limit 1") + GZJCData selectData(); +} \ No newline at end of file diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/dao/mappers/HaierDataMapper.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/dao/mappers/HaierDataMapper.java deleted file mode 100644 index b39d9f0..0000000 --- a/xiuosiot-backend/src/main/java/com/aiit/xiuos/dao/mappers/HaierDataMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.aiit.xiuos.dao.mappers; - -import com.aiit.xiuos.model.HaierData; - -public interface HaierDataMapper { - int deleteByPrimaryKey(Integer id); - - int insert(HaierData record); - - int insertSelective(HaierData record); - - HaierData selectByPrimaryKey(Integer id); - - int updateByPrimaryKeySelective(HaierData record); - - int updateByPrimaryKey(HaierData record); -} \ No newline at end of file diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/model/HaierData.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/model/GZJCData.java similarity index 76% rename from xiuosiot-backend/src/main/java/com/aiit/xiuos/model/HaierData.java rename to xiuosiot-backend/src/main/java/com/aiit/xiuos/model/GZJCData.java index d914d15..017866b 100644 --- a/xiuosiot-backend/src/main/java/com/aiit/xiuos/model/HaierData.java +++ b/xiuosiot-backend/src/main/java/com/aiit/xiuos/model/GZJCData.java @@ -7,7 +7,7 @@ import lombok.Data; @Data @Builder -public class HaierData { +public class GZJCData { private Integer id; private BigDecimal o3; @@ -52,7 +52,7 @@ public class HaierData { private BigDecimal noise; - public HaierData(Integer id, BigDecimal o3, BigDecimal co2, BigDecimal so2, BigDecimal no2, BigDecimal nh3, BigDecimal tvoc, BigDecimal ch2o, BigDecimal c2h5oh, BigDecimal ch4, BigDecimal o2, BigDecimal aqs, BigDecimal humidness, BigDecimal temperature, BigDecimal pm1d0, BigDecimal pm2d5, BigDecimal pm10, BigDecimal windspeed, BigDecimal winddirection, BigDecimal airpressure, Date time, BigDecimal noise) { + public GZJCData(Integer id, BigDecimal o3, BigDecimal co2, BigDecimal so2, BigDecimal no2, BigDecimal nh3, BigDecimal tvoc, BigDecimal ch2o, BigDecimal c2h5oh, BigDecimal ch4, BigDecimal o2, BigDecimal aqs, BigDecimal humidness, BigDecimal temperature, BigDecimal pm1d0, BigDecimal pm2d5, BigDecimal pm10, BigDecimal windspeed, BigDecimal winddirection, BigDecimal airpressure, Date time, BigDecimal noise) { this.id = id; this.o3 = o3; this.co2 = co2; @@ -77,7 +77,7 @@ public class HaierData { this.noise = noise; } - public HaierData() { + public GZJCData() { super(); } } \ No newline at end of file diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/scheduled/HaierDataTaskScheduled.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/scheduled/GZJCTaskScheduled.java similarity index 55% rename from xiuosiot-backend/src/main/java/com/aiit/xiuos/scheduled/HaierDataTaskScheduled.java rename to xiuosiot-backend/src/main/java/com/aiit/xiuos/scheduled/GZJCTaskScheduled.java index 55081e5..b30a6c8 100644 --- a/xiuosiot-backend/src/main/java/com/aiit/xiuos/scheduled/HaierDataTaskScheduled.java +++ b/xiuosiot-backend/src/main/java/com/aiit/xiuos/scheduled/GZJCTaskScheduled.java @@ -3,9 +3,9 @@ package com.aiit.xiuos.scheduled; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.aiit.xiuos.Utils.MyUtils; -import com.aiit.xiuos.model.HaierData; -import com.aiit.xiuos.service.HaierService; -import com.aiit.xiuos.socket.HaiErWebSocketServer; +import com.aiit.xiuos.model.GZJCData; +import com.aiit.xiuos.service.GZJCService; +import com.aiit.xiuos.socket.GZJCWebSocketServer; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; @@ -20,98 +20,98 @@ import java.util.Date; import java.util.Random; @Slf4j @Component -public class HaierDataTaskScheduled { +public class GZJCTaskScheduled { @Autowired - HaiErWebSocketServer haiErWebSocketServer; + GZJCWebSocketServer GZJCWebSocketServer; @Autowired - HaierService haierService; + GZJCService GZJCService; @Scheduled(cron = "0 0 */1 * * ?")//every hour public void insertHaierData() throws ParseException { - HaierData haierData =mockData(); - haierService.insertData(haierData); + GZJCData GZJCData =mockData(); + GZJCService.insertData(GZJCData); } @Scheduled(cron = "*/1 * * * * ?")//every hour public void sendWebsocket() throws ParseException, IOException { - HaierData haierData = mockData(); - JSONObject jsonObject = JSONUtil.parseObj(haierData,false,true); - haiErWebSocketServer.sendInfo(jsonObject.toString()); + GZJCData GZJCData = mockData(); + JSONObject jsonObject = JSONUtil.parseObj(GZJCData,false,true); + GZJCWebSocketServer.sendInfo(jsonObject.toString()); } - public HaierData mockData() throws ParseException { - HaierData haierData =new HaierData(); + public GZJCData mockData() throws ParseException { + GZJCData GZJCData =new GZJCData(); Random rand = new Random(); DecimalFormat df = new DecimalFormat("#.00"); //保留两位数,若数据库已截取,java可不作保留 //生成在max与min之间的随机数 // int randNumber = rand.nextInt(MAX - MIN + 1) + MIN; double o3 =rand.nextInt(10)+30+Math.random(); //O3 - haierData.setO3(new BigDecimal(df.format(o3))); + GZJCData.setO3(new BigDecimal(df.format(o3))); double co2 =rand.nextInt(100)+200+Math.random(); //co2 - haierData.setCo2(new BigDecimal(df.format(co2))); + GZJCData.setCo2(new BigDecimal(df.format(co2))); double so2=0.0; //so2 - haierData.setSo2(new BigDecimal(df.format(so2))); + GZJCData.setSo2(new BigDecimal(df.format(so2))); double no2=0.0; //no2 - haierData.setNo2(new BigDecimal(df.format(no2))); + GZJCData.setNo2(new BigDecimal(df.format(no2))); double nh3=0.0; //nh3 - haierData.setNh3(new BigDecimal(df.format(nh3))); + GZJCData.setNh3(new BigDecimal(df.format(nh3))); double tvoc = rand.nextInt(1)+Math.random(); //tvoc - haierData.setTvoc(new BigDecimal(df.format(tvoc))); + GZJCData.setTvoc(new BigDecimal(df.format(tvoc))); double ch2o =0.0; //ch2o - haierData.setCh2o(new BigDecimal(df.format(ch2o))); + GZJCData.setCh2o(new BigDecimal(df.format(ch2o))); double c2h5oh = rand.nextInt(10)+Math.random(); //c2h5oh - haierData.setC2h5oh(new BigDecimal(df.format(c2h5oh))); + GZJCData.setC2h5oh(new BigDecimal(df.format(c2h5oh))); double ch4 = 0.0; //ch4 - haierData.setCh4(new BigDecimal(df.format(ch4))); + GZJCData.setCh4(new BigDecimal(df.format(ch4))); double o2 = rand.nextInt(10)+20+Math.random(); //o2 - haierData.setO2(new BigDecimal(df.format(o2))); + GZJCData.setO2(new BigDecimal(df.format(o2))); double aqs = rand.nextInt(30)+200+Math.random(); //aqs - haierData.setAqs(new BigDecimal(df.format(aqs))); + GZJCData.setAqs(new BigDecimal(df.format(aqs))); double humidness = rand.nextInt(30)+30+Math.random(); //湿度 - haierData.setHumidness(new BigDecimal(df.format(humidness))); + GZJCData.setHumidness(new BigDecimal(df.format(humidness))); double temperature =rand.nextInt(10)+15+Math.random(); //温度 - haierData.setTemperature(new BigDecimal(df.format(temperature))); + GZJCData.setTemperature(new BigDecimal(df.format(temperature))); double pm1_0=rand.nextInt(20)+Math.random(); //pm1.0 ug/m3 - haierData.setPm1d0(new BigDecimal(df.format(pm1_0))); + GZJCData.setPm1d0(new BigDecimal(df.format(pm1_0))); double pm2_5=rand.nextInt(20)+30+Math.random(); //pm2.5 ug/m3 - haierData.setPm2d5(new BigDecimal(df.format(pm2_5))); + GZJCData.setPm2d5(new BigDecimal(df.format(pm2_5))); double pm10=rand.nextInt(20)+50+Math.random(); //pm10 ug/m3 - haierData.setPm10(new BigDecimal(df.format(pm10))); + GZJCData.setPm10(new BigDecimal(df.format(pm10))); double windspeed = Math.random(); //风速m/s - haierData.setWindspeed(new BigDecimal(df.format(windspeed))); + GZJCData.setWindspeed(new BigDecimal(df.format(windspeed))); double winddirection = rand.nextInt(30)+200; //风向 - haierData.setWinddirection(new BigDecimal(df.format(winddirection))); + GZJCData.setWinddirection(new BigDecimal(df.format(winddirection))); double airpressure=rand.nextInt(100)+900+Math.random(); //气压 - haierData.setAirpressure(new BigDecimal(df.format(airpressure))); + GZJCData.setAirpressure(new BigDecimal(df.format(airpressure))); double noise =rand.nextInt(71)+30+Math.random(); //噪音 pd - haierData.setNoise(new BigDecimal(df.format(noise))); + GZJCData.setNoise(new BigDecimal(df.format(noise))); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = sdf.parse(MyUtils.getTime()); - haierData.setTime(date); - return haierData; + GZJCData.setTime(date); + return GZJCData; } } diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/GZJCService.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/GZJCService.java new file mode 100644 index 0000000..476da7f --- /dev/null +++ b/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/GZJCService.java @@ -0,0 +1,8 @@ +package com.aiit.xiuos.service; + +import com.aiit.xiuos.model.GZJCData; + +public interface GZJCService { + int insertData(GZJCData data); + GZJCData selectData(); +} diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/HaierService.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/HaierService.java deleted file mode 100644 index d640f31..0000000 --- a/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/HaierService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.aiit.xiuos.service; - -import com.aiit.xiuos.model.HaierData; - -public interface HaierService { - int insertData(HaierData data); - HaierData selectData(); -} diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/impl/HaierServiceImpl.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/impl/GZJCServiceImpl.java similarity index 50% rename from xiuosiot-backend/src/main/java/com/aiit/xiuos/service/impl/HaierServiceImpl.java rename to xiuosiot-backend/src/main/java/com/aiit/xiuos/service/impl/GZJCServiceImpl.java index 71ce9c5..f586885 100644 --- a/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/impl/HaierServiceImpl.java +++ b/xiuosiot-backend/src/main/java/com/aiit/xiuos/service/impl/GZJCServiceImpl.java @@ -1,22 +1,23 @@ package com.aiit.xiuos.service.impl; -import com.aiit.xiuos.dao.mappers.HaierDataMapper; -import com.aiit.xiuos.model.HaierData; -import com.aiit.xiuos.service.HaierService; + +import com.aiit.xiuos.dao.mappers.GZJCDataMapper; +import com.aiit.xiuos.model.GZJCData; +import com.aiit.xiuos.service.GZJCService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service -public class HaierServiceImpl implements HaierService { +public class GZJCServiceImpl implements GZJCService { @Autowired - HaierDataMapper haierDataMapper; + GZJCDataMapper haierDataMapper; @Override - public int insertData(HaierData data) { + public int insertData(GZJCData data) { return haierDataMapper.insertSelective(data); } @Override - public HaierData selectData() { + public GZJCData selectData() { return haierDataMapper.selectData(); } } diff --git a/xiuosiot-backend/src/main/java/com/aiit/xiuos/socket/GZJCWebSocketServer.java b/xiuosiot-backend/src/main/java/com/aiit/xiuos/socket/GZJCWebSocketServer.java new file mode 100644 index 0000000..98cbfaa --- /dev/null +++ b/xiuosiot-backend/src/main/java/com/aiit/xiuos/socket/GZJCWebSocketServer.java @@ -0,0 +1,157 @@ +package com.aiit.xiuos.socket; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import javax.websocket.*; +import javax.websocket.server.PathParam; +import javax.websocket.server.ServerEndpoint; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +@ServerEndpoint(value = "/websocket/haier/{clientId}") +@Component +@Slf4j +public class GZJCWebSocketServer { + /** + * 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。 + */ + private static int onlineCount = 0; + + /** + * concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。 + */ + public static ConcurrentHashMap webSocketSet = new ConcurrentHashMap(); + + public HashMap cntofParam = new HashMap(); + + public HashMap numofAccount = new HashMap(); + + /** + * 与某个客户端的连接会话,需要通过它来给客户端发送数据 + */ + private Session session; + + /** + * 传过来的id + */ + private String name = ""; + + /** + * 连接建立成功调用的方法 + */ + @OnOpen + public void onOpen(@PathParam(value = "clientId") String clientId, Session session) { + //接收到发送消息的人员编号 + name = clientId; + this.session = session; + /**加入set中*/ + webSocketSet.put(clientId, this); + /**在线数加1*/ + addOnlineCount(); + log.info("有新连接" + clientId + "加入!当前在线人数为" + getOnlineCount()); + try { + sendMessage(clientId + "-连接已建立-"); + } catch (IOException e) { + log.error("IO异常"); + } + } + + /** + * 连接关闭调用的方法 + */ + @OnClose + public void onClose() { + if (name != null && name != "") { + /** 从set中删除 */ + webSocketSet.remove(name); + /** 在线数减1 */ + subOnlineCount(); + log.info("有一连接" + name + "关闭!当前在线人数为" + getOnlineCount()); + } + } + + /** + * 收到客户端消息后调用的方法 + * + * @param message 客户端发送过来的消息 + */ + @OnMessage + public void onMessage(String message, Session session) { + log.info("来自客户端的消息:" + message); + try { + this.sendMessage("收到!"); + } catch (IOException e) { + log.error(e.getMessage()); + } + } + + /** + * 发生错误时调用 + **/ + @OnError + public void onError(Session session, Throwable error) { + log.error("发生错误"); + error.printStackTrace(); + } + + + public void sendMessage(String message) throws IOException { + synchronized (session) { + getSession().getBasicRemote().sendText(message); + } + } + + /** + * 给指定的人发送消息 + * + * @param message + */ + public void sendToMessageById(String id, String message) { + try { + if (webSocketSet.get(id) != null) { + webSocketSet.get(id).sendMessage(message); + } else { + System.out.println("webSocketSet中没有此key,不推送消息"); + log.info("webSocketSet中没有此key,不推送消息"); + } + } catch (IOException e) { + log.error(e.getMessage()); + } + } + + /** + * 群发自定义消息 + */ + public static void sendInfo(String message) { + try { + for (Map.Entry entry : webSocketSet.entrySet()) { + String name = entry.getKey(); + log.info("发送信息至客户端:" + name); + com.aiit.xiuos.socket.GZJCWebSocketServer value = entry.getValue(); + value.sendMessage(message); + } + } catch (IOException e) { + log.error(e.getMessage()); + } + } + + public Session getSession() { + return session; + } + + public static synchronized int getOnlineCount() { + return onlineCount; + } + + public static synchronized void addOnlineCount() { + com.aiit.xiuos.socket.GZJCWebSocketServer.onlineCount++; + } + + public static synchronized void subOnlineCount() { + com.aiit.xiuos.socket.GZJCWebSocketServer.onlineCount--; + } + + +} diff --git a/xiuosiot-backend/src/main/resources/banner.txt b/xiuosiot-backend/src/main/resources/banner.txt new file mode 100644 index 0000000..e69de29 diff --git a/xiuosiot-backend/src/main/resources/mappers/GZJCDataMapper.xml b/xiuosiot-backend/src/main/resources/mappers/GZJCDataMapper.xml new file mode 100644 index 0000000..43e8903 --- /dev/null +++ b/xiuosiot-backend/src/main/resources/mappers/GZJCDataMapper.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, o3, co2, so2, no2, nh3, tvoc, ch2o, c2h5oh, ch4, o2, aqs, humidness, temperature, + pm1d0, pm2d5, pm10, windspeed, winddirection, airpressure, time, noise + + + + delete from haier_data + where id = #{id,jdbcType=INTEGER} + + + insert into haier_data (id, o3, co2, + so2, no2, nh3, tvoc, + ch2o, c2h5oh, ch4, + o2, aqs, humidness, + temperature, pm1d0, pm2d5, + pm10, windspeed, winddirection, + airpressure, time, noise + ) + values (#{id,jdbcType=INTEGER}, #{o3,jdbcType=NUMERIC}, #{co2,jdbcType=NUMERIC}, + #{so2,jdbcType=NUMERIC}, #{no2,jdbcType=NUMERIC}, #{nh3,jdbcType=NUMERIC}, #{tvoc,jdbcType=NUMERIC}, + #{ch2o,jdbcType=NUMERIC}, #{c2h5oh,jdbcType=NUMERIC}, #{ch4,jdbcType=NUMERIC}, + #{o2,jdbcType=NUMERIC}, #{aqs,jdbcType=NUMERIC}, #{humidness,jdbcType=NUMERIC}, + #{temperature,jdbcType=NUMERIC}, #{pm1d0,jdbcType=NUMERIC}, #{pm2d5,jdbcType=NUMERIC}, + #{pm10,jdbcType=NUMERIC}, #{windspeed,jdbcType=NUMERIC}, #{winddirection,jdbcType=NUMERIC}, + #{airpressure,jdbcType=NUMERIC}, #{time,jdbcType=TIMESTAMP}, #{noise,jdbcType=NUMERIC} + ) + + + insert into haier_data + + + id, + + + o3, + + + co2, + + + so2, + + + no2, + + + nh3, + + + tvoc, + + + ch2o, + + + c2h5oh, + + + ch4, + + + o2, + + + aqs, + + + humidness, + + + temperature, + + + pm1d0, + + + pm2d5, + + + pm10, + + + windspeed, + + + winddirection, + + + airpressure, + + + time, + + + noise, + + + + + #{id,jdbcType=INTEGER}, + + + #{o3,jdbcType=NUMERIC}, + + + #{co2,jdbcType=NUMERIC}, + + + #{so2,jdbcType=NUMERIC}, + + + #{no2,jdbcType=NUMERIC}, + + + #{nh3,jdbcType=NUMERIC}, + + + #{tvoc,jdbcType=NUMERIC}, + + + #{ch2o,jdbcType=NUMERIC}, + + + #{c2h5oh,jdbcType=NUMERIC}, + + + #{ch4,jdbcType=NUMERIC}, + + + #{o2,jdbcType=NUMERIC}, + + + #{aqs,jdbcType=NUMERIC}, + + + #{humidness,jdbcType=NUMERIC}, + + + #{temperature,jdbcType=NUMERIC}, + + + #{pm1d0,jdbcType=NUMERIC}, + + + #{pm2d5,jdbcType=NUMERIC}, + + + #{pm10,jdbcType=NUMERIC}, + + + #{windspeed,jdbcType=NUMERIC}, + + + #{winddirection,jdbcType=NUMERIC}, + + + #{airpressure,jdbcType=NUMERIC}, + + + #{time,jdbcType=TIMESTAMP}, + + + #{noise,jdbcType=NUMERIC}, + + + + + update haier_data + + + o3 = #{o3,jdbcType=NUMERIC}, + + + co2 = #{co2,jdbcType=NUMERIC}, + + + so2 = #{so2,jdbcType=NUMERIC}, + + + no2 = #{no2,jdbcType=NUMERIC}, + + + nh3 = #{nh3,jdbcType=NUMERIC}, + + + tvoc = #{tvoc,jdbcType=NUMERIC}, + + + ch2o = #{ch2o,jdbcType=NUMERIC}, + + + c2h5oh = #{c2h5oh,jdbcType=NUMERIC}, + + + ch4 = #{ch4,jdbcType=NUMERIC}, + + + o2 = #{o2,jdbcType=NUMERIC}, + + + aqs = #{aqs,jdbcType=NUMERIC}, + + + humidness = #{humidness,jdbcType=NUMERIC}, + + + temperature = #{temperature,jdbcType=NUMERIC}, + + + pm1d0 = #{pm1d0,jdbcType=NUMERIC}, + + + pm2d5 = #{pm2d5,jdbcType=NUMERIC}, + + + pm10 = #{pm10,jdbcType=NUMERIC}, + + + windspeed = #{windspeed,jdbcType=NUMERIC}, + + + winddirection = #{winddirection,jdbcType=NUMERIC}, + + + airpressure = #{airpressure,jdbcType=NUMERIC}, + + + time = #{time,jdbcType=TIMESTAMP}, + + + noise = #{noise,jdbcType=NUMERIC}, + + + where id = #{id,jdbcType=INTEGER} + + + update haier_data + set o3 = #{o3,jdbcType=NUMERIC}, + co2 = #{co2,jdbcType=NUMERIC}, + so2 = #{so2,jdbcType=NUMERIC}, + no2 = #{no2,jdbcType=NUMERIC}, + nh3 = #{nh3,jdbcType=NUMERIC}, + tvoc = #{tvoc,jdbcType=NUMERIC}, + ch2o = #{ch2o,jdbcType=NUMERIC}, + c2h5oh = #{c2h5oh,jdbcType=NUMERIC}, + ch4 = #{ch4,jdbcType=NUMERIC}, + o2 = #{o2,jdbcType=NUMERIC}, + aqs = #{aqs,jdbcType=NUMERIC}, + humidness = #{humidness,jdbcType=NUMERIC}, + temperature = #{temperature,jdbcType=NUMERIC}, + pm1d0 = #{pm1d0,jdbcType=NUMERIC}, + pm2d5 = #{pm2d5,jdbcType=NUMERIC}, + pm10 = #{pm10,jdbcType=NUMERIC}, + windspeed = #{windspeed,jdbcType=NUMERIC}, + winddirection = #{winddirection,jdbcType=NUMERIC}, + airpressure = #{airpressure,jdbcType=NUMERIC}, + time = #{time,jdbcType=TIMESTAMP}, + noise = #{noise,jdbcType=NUMERIC} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file