修复字段名错误

pull/872/head
648540858 2023-05-22 11:23:48 +08:00
parent e3225d4844
commit 061749548c
3 changed files with 11 additions and 11 deletions

View File

@ -88,12 +88,12 @@ public interface DeviceChannelMapper {
"SELECT " + "SELECT " +
"dc.*, " + "dc.*, " +
"de.name as device_name, " + "de.name as device_name, " +
"de.online as device_online " + "de.on_line as device_online " +
"from " + "from " +
"wvp_device_channel dc " + "wvp_device_channel dc " +
"LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " +
"WHERE 1=1" + "WHERE 1=1" +
" <if test='device_id != null'> AND dc.device_id = #{deviceId} </if> " + " <if test='deviceId != null'> AND dc.device_id = #{deviceId} </if> " +
" <if test='query != null'> AND (dc.channel_id LIKE '%${query}%' OR dc.name LIKE '%${query}%' OR dc.name LIKE '%${query}%')</if> " + " <if test='query != null'> AND (dc.channel_id LIKE '%${query}%' OR dc.name LIKE '%${query}%' OR dc.name LIKE '%${query}%')</if> " +
" <if test='parentChannelId != null'> AND dc.parent_id=#{parentChannelId} </if> " + " <if test='parentChannelId != null'> AND dc.parent_id=#{parentChannelId} </if> " +
" <if test='online == true' > AND dc.status=true</if>" + " <if test='online == true' > AND dc.status=true</if>" +
@ -112,7 +112,7 @@ public interface DeviceChannelMapper {
"SELECT " + "SELECT " +
"dc.*, " + "dc.*, " +
"de.name as device_name, " + "de.name as device_name, " +
"de.online as device_online " + "de.on_line as device_online " +
"from " + "from " +
"wvp_device_channel dc " + "wvp_device_channel dc " +
"LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " +

View File

@ -148,7 +148,7 @@ public class ApiDeviceController {
deviceJOSNChannel.put("ID", deviceChannelExtend.getChannelId()); deviceJOSNChannel.put("ID", deviceChannelExtend.getChannelId());
deviceJOSNChannel.put("DeviceID", deviceChannelExtend.getDeviceId()); deviceJOSNChannel.put("DeviceID", deviceChannelExtend.getDeviceId());
deviceJOSNChannel.put("DeviceName", deviceChannelExtend.getDeviceName()); deviceJOSNChannel.put("DeviceName", deviceChannelExtend.getDeviceName());
deviceJOSNChannel.put("DeviceOnline", deviceChannelExtend.getDeviceOnline() == 1); deviceJOSNChannel.put("DeviceOnline", deviceChannelExtend.isDeviceOnline());
deviceJOSNChannel.put("Channel", 0); // TODO 自定义序号 deviceJOSNChannel.put("Channel", 0); // TODO 自定义序号
deviceJOSNChannel.put("Name", deviceChannelExtend.getName()); deviceJOSNChannel.put("Name", deviceChannelExtend.getName());
deviceJOSNChannel.put("Custom", false); deviceJOSNChannel.put("Custom", false);
@ -167,7 +167,7 @@ public class ApiDeviceController {
// 1-IETF RFC3261, // 1-IETF RFC3261,
// 2-基于口令的双向认证, // 2-基于口令的双向认证,
// 3-基于数字证书的双向认证 // 3-基于数字证书的双向认证
deviceJOSNChannel.put("Status", deviceChannelExtend.getStatus() == 1 ? "ON":"OFF"); deviceJOSNChannel.put("Status", deviceChannelExtend.isStatus() ? "ON":"OFF");
deviceJOSNChannel.put("Longitude", deviceChannelExtend.getLongitude()); deviceJOSNChannel.put("Longitude", deviceChannelExtend.getLongitude());
deviceJOSNChannel.put("Latitude", deviceChannelExtend.getLatitude()); deviceJOSNChannel.put("Latitude", deviceChannelExtend.getLatitude());
deviceJOSNChannel.put("PTZType ", deviceChannelExtend.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球, deviceJOSNChannel.put("PTZType ", deviceChannelExtend.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球,

View File

@ -25,7 +25,7 @@ public class DeviceChannelExtend {
private String deviceName; private String deviceName;
private int deviceOnline; private boolean deviceOnline;
/** /**
* *
@ -146,7 +146,7 @@ public class DeviceChannelExtend {
* <Status>OFF</Status> * <Status>OFF</Status>
* NVRIPC Status OFF * NVRIPC Status OFF
*/ */
private int status; private boolean status;
/** /**
* *
@ -417,11 +417,11 @@ public class DeviceChannelExtend {
this.PTZTypeText = PTZTypeText; this.PTZTypeText = PTZTypeText;
} }
public int getStatus() { public boolean isStatus() {
return status; return status;
} }
public void setStatus(int status) { public void setStatus(boolean status) {
this.status = status; this.status = status;
} }
@ -545,11 +545,11 @@ public class DeviceChannelExtend {
this.deviceName = deviceName; this.deviceName = deviceName;
} }
public int getDeviceOnline() { public boolean isDeviceOnline() {
return deviceOnline; return deviceOnline;
} }
public void setDeviceOnline(int deviceOnline) { public void setDeviceOnline(boolean deviceOnline) {
this.deviceOnline = deviceOnline; this.deviceOnline = deviceOnline;
} }
} }