1. 修正字段数据类型错误

This commit is contained in:
HuangXin 2023-08-21 21:55:31 +08:00
parent 4af0ab0f9e
commit 477b9bcaf0
5 changed files with 5 additions and 9 deletions

View File

@ -8,7 +8,7 @@ import java.util.List;
public interface SensorDataMapper {
List<SensorData> selectAll();
SensorData getSensorDataById(@Param("devId") Integer devId);
SensorData getSensorDataById(@Param("devId") Long devId);
int addSensorData(@Param("sensor") SensorData sensorData);

View File

@ -1,7 +1,5 @@
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 lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -10,9 +10,7 @@ public class QuerySensorProtocol {
private byte city;
private byte nControlInfo;
/**
* The Controll contents.
*/
//private List<SensorControllContent> controllContents;
}

View File

@ -11,5 +11,5 @@ public interface SensorDataService {
void addNewSensor(SensorStatusInfo sensorList);
SensorStatusInfo getSensorDataById(Integer sensorId);
SensorStatusInfo getSensorDataById(Long sensorId);
}

View File

@ -68,7 +68,7 @@ public class SensorDataServiceImpl implements SensorDataService {
@Override
public void addNewSensor(SensorStatusInfo v) {
SensorData s = SensorData.builder()
.deviceId(v.getSensorId().intValue())
.deviceId(v.getSensorId().longValue())
.channelType(v.getTunnelName())
.command(v.getCommand())
.startAddr(v.getStartAddr().intValue())
@ -91,7 +91,7 @@ public class SensorDataServiceImpl implements SensorDataService {
}
@Override
public SensorStatusInfo getSensorDataById(Integer sensorId) {
public SensorStatusInfo getSensorDataById(Long sensorId) {
SensorData s = sensorDataMapper.getSensorDataById(sensorId);
if (s != null) {