1. 修正字段数据类型错误
This commit is contained in:
parent
4af0ab0f9e
commit
477b9bcaf0
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||||
public interface SensorDataMapper {
|
public interface SensorDataMapper {
|
||||||
List<SensorData> selectAll();
|
List<SensorData> selectAll();
|
||||||
|
|
||||||
SensorData getSensorDataById(@Param("devId") Integer devId);
|
SensorData getSensorDataById(@Param("devId") Long devId);
|
||||||
|
|
||||||
int addSensorData(@Param("sensor") SensorData sensorData);
|
int addSensorData(@Param("sensor") SensorData sensorData);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.zjyr.beidouservice.pojo.entry;
|
package com.zjyr.beidouservice.pojo.entry;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
||||||
import com.zjyr.beidouservice.common.impl.SensorControlTunnelName;
|
import com.zjyr.beidouservice.common.impl.SensorControlTunnelName;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
|
|
|
@ -10,9 +10,7 @@ public class QuerySensorProtocol {
|
||||||
private byte city;
|
private byte city;
|
||||||
|
|
||||||
private byte nControlInfo;
|
private byte nControlInfo;
|
||||||
/**
|
|
||||||
* The Controll contents.
|
|
||||||
*/
|
|
||||||
//private List<SensorControllContent> controllContents;
|
//private List<SensorControllContent> controllContents;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,5 @@ public interface SensorDataService {
|
||||||
|
|
||||||
void addNewSensor(SensorStatusInfo sensorList);
|
void addNewSensor(SensorStatusInfo sensorList);
|
||||||
|
|
||||||
SensorStatusInfo getSensorDataById(Integer sensorId);
|
SensorStatusInfo getSensorDataById(Long sensorId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class SensorDataServiceImpl implements SensorDataService {
|
||||||
@Override
|
@Override
|
||||||
public void addNewSensor(SensorStatusInfo v) {
|
public void addNewSensor(SensorStatusInfo v) {
|
||||||
SensorData s = SensorData.builder()
|
SensorData s = SensorData.builder()
|
||||||
.deviceId(v.getSensorId().intValue())
|
.deviceId(v.getSensorId().longValue())
|
||||||
.channelType(v.getTunnelName())
|
.channelType(v.getTunnelName())
|
||||||
.command(v.getCommand())
|
.command(v.getCommand())
|
||||||
.startAddr(v.getStartAddr().intValue())
|
.startAddr(v.getStartAddr().intValue())
|
||||||
|
@ -91,7 +91,7 @@ public class SensorDataServiceImpl implements SensorDataService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SensorStatusInfo getSensorDataById(Integer sensorId) {
|
public SensorStatusInfo getSensorDataById(Long sensorId) {
|
||||||
SensorData s = sensorDataMapper.getSensorDataById(sensorId);
|
SensorData s = sensorDataMapper.getSensorDataById(sensorId);
|
||||||
|
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
|
|
Loading…
Reference in New Issue