|
|
@@ -82,7 +82,7 @@ public class MqttServiceImpl implements MqttService {
|
|
|
if(saveAndForward) {
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(mqttStr);
|
|
|
- Long sensorId = Long.valueOf((String) jsonObject.get("sensorId"));
|
|
|
+ Long sensorId = jsonObject.getLong("sensorId");
|
|
|
TblSensor tblSensor = tblSensorMapper.selectById(sensorId);
|
|
|
Long deviceId = tblSensor.getDeviceId();
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|