liuyongxin 10 mēneši atpakaļ
vecāks
revīzija
f904924522

+ 0 - 80
src/main/java/com/lutao/uav/domain/entity/GasMessage.java

@@ -1,80 +0,0 @@
-package com.lutao.uav.domain.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-@TableName("gas_message")
-public class GasMessage implements Serializable {
-
-
-    private static final long serialVersionUID = -3318949032429135587L;
-
-    @TableId(value = "id",type = IdType.ASSIGN_UUID)
-    private String id;
-
-    /**
-     * 地点
-     */
-    private String companyName;
-
-    /**
-     * 点位
-     */
-    private String pointName;
-
-    /**
-     * 编码1
-     */
-    private String pointCode;
-
-    /**
-     * 编码2
-     */
-    private String pointCode2;
-
-    /**
-     * 点名称
-     */
-    private String pointType;
-
-    /**
-     * 单位
-     */
-    private String unit;
-
-    /**
-     * 经度
-     */
-    private String longitude;
-
-    /**
-     * 纬度
-     */
-    private String latitude;
-
-    /**
-     * 低报
-     */
-    private String lowReport;
-
-    /**
-     * 低低报
-     */
-    private String lowLowReport;
-
-    /**
-     * 高报
-     */
-    private String highReport;
-
-    /**
-     * 高高报
-     */
-    private String highHighReport;
-
-}

+ 0 - 9
src/main/java/com/lutao/uav/mapper/GasMessageMapper.java

@@ -1,9 +0,0 @@
-package com.lutao.uav.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.lutao.uav.domain.entity.GasMessage;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface GasMessageMapper extends BaseMapper<GasMessage> {
-}

+ 6 - 8
src/main/java/com/lutao/uav/mqtt/MqttConfig.java

@@ -3,14 +3,15 @@ package com.lutao.uav.mqtt;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.lutao.uav.domain.entity.GasMessage;
 import com.lutao.uav.domain.entity.NorthSeaGasPoint;
-import com.lutao.uav.service.GasMessageService;
 import com.lutao.uav.service.NorthSeaGasPointService;
 import lombok.extern.slf4j.Slf4j;
 import org.eclipse.paho.client.mqttv3.*;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.data.geo.*;
+import org.springframework.data.geo.Circle;
+import org.springframework.data.geo.Distance;
+import org.springframework.data.geo.GeoResults;
+import org.springframework.data.geo.Point;
 import org.springframework.data.redis.connection.RedisGeoCommands;
 import org.springframework.data.redis.core.BoundGeoOperations;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -55,9 +56,6 @@ public class MqttConfig {
     @Resource
     private KafkaTemplate kafkaTemplate;
 
-    @Resource
-    private GasMessageService gasMessageService;
-
     private MqttClient client;
     private ExecutorService executorService;
 
@@ -125,8 +123,8 @@ public class MqttConfig {
                                      * "collectTime":"2024-04-12 18:21:11"
                                      * }
                                      */
-                                    List<GasMessage> gasMessages = gasMessageService.list();
-                                    for (GasMessage gasMessage : gasMessages) {
+                                    List<NorthSeaGasPoint> gasMessages = northSeaGasPointService.list();
+                                    for (NorthSeaGasPoint gasMessage : gasMessages) {
                                         JSONObject kafkaSendMessage = new JSONObject();
                                         kafkaSendMessage.put("enterpriseId", gasMessage.getCompanyName());
                                         kafkaSendMessage.put("equipCode", gasMessage.getPointCode());

+ 0 - 7
src/main/java/com/lutao/uav/service/GasMessageService.java

@@ -1,7 +0,0 @@
-package com.lutao.uav.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.lutao.uav.domain.entity.GasMessage;
-
-public interface GasMessageService extends IService<GasMessage> {
-}

+ 0 - 11
src/main/java/com/lutao/uav/service/impl/GasMessageServiceImpl.java

@@ -1,11 +0,0 @@
-package com.lutao.uav.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.lutao.uav.domain.entity.GasMessage;
-import com.lutao.uav.mapper.GasMessageMapper;
-import com.lutao.uav.service.GasMessageService;
-import org.springframework.stereotype.Service;
-
-@Service
-public class GasMessageServiceImpl extends ServiceImpl<GasMessageMapper, GasMessage> implements GasMessageService {
-}

+ 0 - 9
src/main/resources/mapper/CollectLogMapper.xml

@@ -1,9 +0,0 @@
-<?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.forever.crawler.mapper.CollectLogMapper">
-
-
-</mapper>

+ 0 - 4
src/main/resources/mapper/GasMessageMapper.xml

@@ -1,4 +0,0 @@
-<?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.lutao.uav.mapper.GasMessageMapper">
-</mapper>

+ 1 - 1
src/main/resources/mapper/VideoInfoMapper.xml

@@ -1,4 +1,4 @@
 <?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.forever.crawler.mapper.VideoInfoMapper">
+<mapper namespace="com.lutao.uav.mapper.NorthSeaGasPointMapper">
 </mapper>

+ 0 - 10
src/main/resources/mapper/ProfEquipmentInfoMapper.xml

@@ -1,10 +0,0 @@
-<?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.forever.crawler.mapper.ProfEquipmentInfoMapper">
-
-
-
-</mapper>