Browse Source

bug修复

lihui001 3 years ago
parent
commit
61fbe6b4ef

+ 2 - 2
zoniot-rmcp/zoniot-rmcp-core/src/main/java/com/zcxk/rmcp/core/dao/mongo/MeterReadRecordDao.java

@@ -134,7 +134,7 @@ public class MeterReadRecordDao extends BaseDao<MeterReadRecord, String> impleme
                     Device deviceUpdate = new Device();
                     deviceUpdate.setId(deviceId);
                     deviceUpdate.setReadData(readData.toPlainString());
-                    deviceMapper.updateByDeviceData(deviceUpdate);
+                    deviceMapper.updateByPrimaryKeySelective(deviceUpdate);
                     return total;
                 }
                 String month =  (localDateTime.getMonthValue() +"").length() == 1 ? "0" + localDateTime.getMonthValue() : localDateTime.getMonthValue() +"";
@@ -144,7 +144,7 @@ public class MeterReadRecordDao extends BaseDao<MeterReadRecord, String> impleme
                     Device deviceUpdate = new Device();
                     deviceUpdate.setId(deviceId);
                     deviceUpdate.setReadData(readData.toPlainString());
-                    deviceMapper.updateByDeviceData(deviceUpdate);
+                    deviceMapper.updateByPrimaryKeySelective(deviceUpdate);
                 }
             }
         }