diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mqtt/EmqxService.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mqtt/EmqxService.java
index 97d64813..ca132e19 100644
--- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mqtt/EmqxService.java
+++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mqtt/EmqxService.java
@@ -34,9 +34,6 @@ public class EmqxService {
@Autowired
private IDeviceService deviceService;
-// @Autowired
-// private IDeviceLogService deviceLogService;
-
@Autowired
private ILogService logService;
@@ -133,11 +130,6 @@ public class EmqxService {
Device device = JSON.parseObject(message, Device.class);
device.setProductId(productId);
device.setSerialNumber(deviceNum);
- // 未采用设备定位则清空定位,定位方式(1=ip自动定位,2=设备定位,3=自定义)
- if(device.getLocationWay()!=2){
- device.setLatitude(null);
- device.setLongitude(null);
- }
deviceService.reportDevice(device);
} catch (Exception e) {
logger.error("接收设备信息,解析数据时异常 message={}", e.getMessage());
diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java
index c1d1940a..06d2196d 100644
--- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java
+++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/impl/DeviceServiceImpl.java
@@ -825,6 +825,11 @@ public class DeviceServiceImpl implements IDeviceService {
@Override
public int reportDevice(Device device) {
Device deviceEntity=deviceMapper.selectDeviceBySerialNumber(device.getSerialNumber());
+ // 未采用设备定位则清空定位,定位方式(1=ip自动定位,2=设备定位,3=自定义)
+ if(deviceEntity.getLocationWay()!=2){
+ device.setLatitude(null);
+ device.setLongitude(null);
+ }
int result=0;
if(deviceEntity!=null){
// 更新设备信息
diff --git a/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml
index bf01efdd..9314d418 100644
--- a/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml
+++ b/springboot/wumei-iot/src/main/resources/mapper/iot/DeviceMapper.xml
@@ -316,6 +316,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time,
remark,
img_url,
+ summary,
#{deviceName},
@@ -344,6 +345,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{updateTime},
#{remark},
#{imgUrl},
+ #{summary},
@@ -376,6 +378,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time = #{updateTime},
remark = #{remark},
img_url = #{imgUrl},
+ summary = #{summary},
where device_id = #{deviceId}
@@ -428,6 +431,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time = #{updateTime},
remark = #{remark},
img_url = #{imgUrl},
+ summary = #{summary},
where serial_number = #{serialNumber}