修改设备表 索引定义 与 添加设备 逻辑
一个下级平台 有多个设备, 每个设备为一个通道
This commit is contained in:
parent
ffac3458fd
commit
8d1bc71170
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<mapper namespace="cn.skcks.docking.gb28181.wvp.orm.mybatis.operation.WvpProxyOperateTableMapper">
|
<mapper namespace="cn.skcks.docking.gb28181.wvp.orm.mybatis.operation.WvpProxyOperateTableMapper">
|
||||||
<update id="createDeviceTable">
|
<update id="createDeviceTable">
|
||||||
CREATE TABLE `wvp_proxy_device` (
|
CREATE TABLE IF NOT EXISTS `wvp_proxy_device` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
`device_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`device_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
`gb_device_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`gb_device_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
|
@ -27,7 +27,6 @@ import cn.skcks.docking.gb28181.wvp.service.download.DownloadService;
|
|||||||
import cn.skcks.docking.gb28181.wvp.service.video.RecordService;
|
import cn.skcks.docking.gb28181.wvp.service.video.RecordService;
|
||||||
import cn.skcks.docking.gb28181.wvp.utils.RetryUtil;
|
import cn.skcks.docking.gb28181.wvp.utils.RetryUtil;
|
||||||
import com.github.rholder.retry.*;
|
import com.github.rholder.retry.*;
|
||||||
import io.swagger.v3.core.util.Json;
|
|
||||||
import jakarta.servlet.AsyncContext;
|
import jakarta.servlet.AsyncContext;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@ -128,7 +127,10 @@ public class WvpService {
|
|||||||
log.info("wvp 登录成功 token => {}", token);
|
log.info("wvp 登录成功 token => {}", token);
|
||||||
|
|
||||||
log.debug("通过 wvp 查询设备 国标id(gbDeviceId => {}) 通道信息", deviceId);
|
log.debug("通过 wvp 查询设备 国标id(gbDeviceId => {}) 通道信息", deviceId);
|
||||||
JsonResponse<GetDeviceChannelsResp> deviceChannels = wvpProxyClient.getDeviceChannels(token, deviceId, GetDeviceChannelsReq.builder().build());
|
JsonResponse<GetDeviceChannelsResp> deviceChannels = wvpProxyClient.getDeviceChannels(
|
||||||
|
token,
|
||||||
|
deviceId,
|
||||||
|
GetDeviceChannelsReq.builder().query(channelId).build());
|
||||||
if (deviceChannels.getData() == null || deviceChannels.getData().getTotal() == 0) {
|
if (deviceChannels.getData() == null || deviceChannels.getData().getTotal() == 0) {
|
||||||
writeErrorToResponse(response, JsonResponse.error(MessageFormat.format("未能获取 设备: {0}, 国标id: {1}, 的通道信息", deviceCode, deviceId)));
|
writeErrorToResponse(response, JsonResponse.error(MessageFormat.format("未能获取 设备: {0}, 国标id: {1}, 的通道信息", deviceCode, deviceId)));
|
||||||
return JsonResponse.success(null);
|
return JsonResponse.success(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user