Commit 061749548c0b603774582f823768c23f351a39e1
1 parent
e3225d48
修复字段名错误
Showing
3 changed files
with
11 additions
and
11 deletions
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
| @@ -88,12 +88,12 @@ public interface DeviceChannelMapper { | @@ -88,12 +88,12 @@ public interface DeviceChannelMapper { | ||
| 88 | "SELECT " + | 88 | "SELECT " + |
| 89 | "dc.*, " + | 89 | "dc.*, " + |
| 90 | "de.name as device_name, " + | 90 | "de.name as device_name, " + |
| 91 | - "de.online as device_online " + | 91 | + "de.on_line as device_online " + |
| 92 | "from " + | 92 | "from " + |
| 93 | "wvp_device_channel dc " + | 93 | "wvp_device_channel dc " + |
| 94 | "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + | 94 | "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + |
| 95 | "WHERE 1=1" + | 95 | "WHERE 1=1" + |
| 96 | - " <if test='device_id != null'> AND dc.device_id = #{deviceId} </if> " + | 96 | + " <if test='deviceId != null'> AND dc.device_id = #{deviceId} </if> " + |
| 97 | " <if test='query != null'> AND (dc.channel_id LIKE '%${query}%' OR dc.name LIKE '%${query}%' OR dc.name LIKE '%${query}%')</if> " + | 97 | " <if test='query != null'> AND (dc.channel_id LIKE '%${query}%' OR dc.name LIKE '%${query}%' OR dc.name LIKE '%${query}%')</if> " + |
| 98 | " <if test='parentChannelId != null'> AND dc.parent_id=#{parentChannelId} </if> " + | 98 | " <if test='parentChannelId != null'> AND dc.parent_id=#{parentChannelId} </if> " + |
| 99 | " <if test='online == true' > AND dc.status=true</if>" + | 99 | " <if test='online == true' > AND dc.status=true</if>" + |
| @@ -112,7 +112,7 @@ public interface DeviceChannelMapper { | @@ -112,7 +112,7 @@ public interface DeviceChannelMapper { | ||
| 112 | "SELECT " + | 112 | "SELECT " + |
| 113 | "dc.*, " + | 113 | "dc.*, " + |
| 114 | "de.name as device_name, " + | 114 | "de.name as device_name, " + |
| 115 | - "de.online as device_online " + | 115 | + "de.on_line as device_online " + |
| 116 | "from " + | 116 | "from " + |
| 117 | "wvp_device_channel dc " + | 117 | "wvp_device_channel dc " + |
| 118 | "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + | 118 | "LEFT JOIN wvp_device de ON dc.device_id = de.device_id " + |
src/main/java/com/genersoft/iot/vmp/web/gb28181/ApiDeviceController.java
| @@ -148,7 +148,7 @@ public class ApiDeviceController { | @@ -148,7 +148,7 @@ public class ApiDeviceController { | ||
| 148 | deviceJOSNChannel.put("ID", deviceChannelExtend.getChannelId()); | 148 | deviceJOSNChannel.put("ID", deviceChannelExtend.getChannelId()); |
| 149 | deviceJOSNChannel.put("DeviceID", deviceChannelExtend.getDeviceId()); | 149 | deviceJOSNChannel.put("DeviceID", deviceChannelExtend.getDeviceId()); |
| 150 | deviceJOSNChannel.put("DeviceName", deviceChannelExtend.getDeviceName()); | 150 | deviceJOSNChannel.put("DeviceName", deviceChannelExtend.getDeviceName()); |
| 151 | - deviceJOSNChannel.put("DeviceOnline", deviceChannelExtend.getDeviceOnline() == 1); | 151 | + deviceJOSNChannel.put("DeviceOnline", deviceChannelExtend.isDeviceOnline()); |
| 152 | deviceJOSNChannel.put("Channel", 0); // TODO 自定义序号 | 152 | deviceJOSNChannel.put("Channel", 0); // TODO 自定义序号 |
| 153 | deviceJOSNChannel.put("Name", deviceChannelExtend.getName()); | 153 | deviceJOSNChannel.put("Name", deviceChannelExtend.getName()); |
| 154 | deviceJOSNChannel.put("Custom", false); | 154 | deviceJOSNChannel.put("Custom", false); |
| @@ -167,7 +167,7 @@ public class ApiDeviceController { | @@ -167,7 +167,7 @@ public class ApiDeviceController { | ||
| 167 | // 1-IETF RFC3261, | 167 | // 1-IETF RFC3261, |
| 168 | // 2-基于口令的双向认证, | 168 | // 2-基于口令的双向认证, |
| 169 | // 3-基于数字证书的双向认证 | 169 | // 3-基于数字证书的双向认证 |
| 170 | - deviceJOSNChannel.put("Status", deviceChannelExtend.getStatus() == 1 ? "ON":"OFF"); | 170 | + deviceJOSNChannel.put("Status", deviceChannelExtend.isStatus() ? "ON":"OFF"); |
| 171 | deviceJOSNChannel.put("Longitude", deviceChannelExtend.getLongitude()); | 171 | deviceJOSNChannel.put("Longitude", deviceChannelExtend.getLongitude()); |
| 172 | deviceJOSNChannel.put("Latitude", deviceChannelExtend.getLatitude()); | 172 | deviceJOSNChannel.put("Latitude", deviceChannelExtend.getLatitude()); |
| 173 | deviceJOSNChannel.put("PTZType ", deviceChannelExtend.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球, | 173 | deviceJOSNChannel.put("PTZType ", deviceChannelExtend.getPTZType()); // 云台类型, 0 - 未知, 1 - 球机, 2 - 半球, |
src/main/java/com/genersoft/iot/vmp/web/gb28181/dto/DeviceChannelExtend.java
| @@ -25,7 +25,7 @@ public class DeviceChannelExtend { | @@ -25,7 +25,7 @@ public class DeviceChannelExtend { | ||
| 25 | 25 | ||
| 26 | private String deviceName; | 26 | private String deviceName; |
| 27 | 27 | ||
| 28 | - private int deviceOnline; | 28 | + private boolean deviceOnline; |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | * 生产厂商 | 31 | * 生产厂商 |
| @@ -146,7 +146,7 @@ public class DeviceChannelExtend { | @@ -146,7 +146,7 @@ public class DeviceChannelExtend { | ||
| 146 | * <Status>OFF</Status> | 146 | * <Status>OFF</Status> |
| 147 | * 遇到过NVR下的IPC下发信令可以推流, 但是 Status 响应 OFF | 147 | * 遇到过NVR下的IPC下发信令可以推流, 但是 Status 响应 OFF |
| 148 | */ | 148 | */ |
| 149 | - private int status; | 149 | + private boolean status; |
| 150 | 150 | ||
| 151 | /** | 151 | /** |
| 152 | * 经度 | 152 | * 经度 |
| @@ -417,11 +417,11 @@ public class DeviceChannelExtend { | @@ -417,11 +417,11 @@ public class DeviceChannelExtend { | ||
| 417 | this.PTZTypeText = PTZTypeText; | 417 | this.PTZTypeText = PTZTypeText; |
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | - public int getStatus() { | 420 | + public boolean isStatus() { |
| 421 | return status; | 421 | return status; |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | - public void setStatus(int status) { | 424 | + public void setStatus(boolean status) { |
| 425 | this.status = status; | 425 | this.status = status; |
| 426 | } | 426 | } |
| 427 | 427 | ||
| @@ -545,11 +545,11 @@ public class DeviceChannelExtend { | @@ -545,11 +545,11 @@ public class DeviceChannelExtend { | ||
| 545 | this.deviceName = deviceName; | 545 | this.deviceName = deviceName; |
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | - public int getDeviceOnline() { | 548 | + public boolean isDeviceOnline() { |
| 549 | return deviceOnline; | 549 | return deviceOnline; |
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | - public void setDeviceOnline(int deviceOnline) { | 552 | + public void setDeviceOnline(boolean deviceOnline) { |
| 553 | this.deviceOnline = deviceOnline; | 553 | this.deviceOnline = deviceOnline; |
| 554 | } | 554 | } |
| 555 | } | 555 | } |