From 8dc27d13533c4c76e20364c61cb3b570275d5a69 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 29 Aug 2024 16:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E6=A0=87=E7=BA=A7=E8=81=94=E9=80=9A?= =?UTF-8?q?=E9=81=93=E5=85=B1=E4=BA=AB=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=80=9A=E9=81=93=E7=BC=96=E5=8F=B7=E5=92=8C=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/gb28181/bean/PlatformChannel.java | 200 +++++++- .../controller/PlatformController.java | 8 + .../gb28181/dao/CommonGBChannelMapper.java | 208 ++++----- .../gb28181/dao/PlatformChannelMapper.java | 432 +++++++++++------- .../service/IPlatformChannelService.java | 2 + .../impl/PlatformChannelServiceImpl.java | 16 +- .../impl/VideoManagerStorageImpl.java | 2 +- .../src/components/dialog/shareChannelAdd.vue | 45 ++ 数据库/2.7.2-重构/初始化-mysql-2.7.2.sql | 78 ++-- 9 files changed, 680 insertions(+), 311 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/PlatformChannel.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/PlatformChannel.java index 7b6dc0da..a9517b34 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/PlatformChannel.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/PlatformChannel.java @@ -1,10 +1,208 @@ package com.genersoft.iot.vmp.gb28181.bean; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data -public class PlatformChannel extends CommonGBChannel{ +public class PlatformChannel extends CommonGBChannel { + + @Schema(description = "Id") + private int id; + + @Schema(description = "平台ID") private int platformId; + + @Schema(description = "国标-编码") + private String customDeviceId; + + @Schema(description = "国标-名称") + private String customName; + + @Schema(description = "国标-设备厂商") + private String customManufacturer; + + @Schema(description = "国标-设备型号") + private String customModel; + + // 2016 + @Schema(description = "国标-设备归属") + private String customOwner; + + @Schema(description = "国标-行政区域") + private String customCivilCode; + + @Schema(description = "国标-警区") + private String customBlock; + + @Schema(description = "国标-安装地址") + private String customAddress; + + @Schema(description = "国标-是否有子设备") + private Integer customParental; + + @Schema(description = "国标-父节点ID") + private String customParentId; + + // 2016 + @Schema(description = "国标-信令安全模式") + private Integer customSafetyWay; + + @Schema(description = "国标-注册方式") + private Integer customRegisterWay; + + // 2016 + @Schema(description = "国标-证书序列号") + private Integer customCertNum; + + // 2016 + @Schema(description = "国标-证书有效标识") + private Integer customCertifiable; + + // 2016 + @Schema(description = "国标-无效原因码(有证书且证书无效的设备必选)") + private Integer customErrCode; + + // 2016 + @Schema(description = "国标-证书终止有效期(有证书且证书无效的设备必选)") + private Integer customEndTime; + + // 2022 + @Schema(description = "国标-摄像机安全能力等级代码") + private String customSecurityLevelCode; + + @Schema(description = "国标-保密属性(必选)缺省为0;0-不涉密,1-涉密") + private Integer customSecrecy; + + @Schema(description = "国标-设备/系统IPv4/IPv6地址") + private String customIpAddress; + + @Schema(description = "国标-设备/系统端口") + private Integer customPort; + + @Schema(description = "国标-设备口令") + private String customPassword; + + @Schema(description = "国标-设备状态") + private String customStatus; + + @Schema(description = "国标-经度 WGS-84坐标系") + private Double customLongitude; + + @Schema(description = "国标-纬度 WGS-84坐标系") + private Double customLatitude; + + @Schema(description = "国标-虚拟组织所属的业务分组ID") + private String customBusinessGroupId; + + @Schema(description = "国标-摄像机结构类型,标识摄像机类型: 1-球机; 2-半球; 3-固定枪机; 4-遥控枪机;5-遥控半球;6-多目设备的全景/拼接通道;7-多目设备的分割通道") + private Integer customPtzType; + + // 2016 + @Schema(description = "-摄像机位置类型扩展。1-省际检查站、2-党政机关、3-车站码头、4-中心广场、5-体育场馆、6-商业中心、7-宗教场所、" + + "8-校园周边、9-治安复杂区域、10-交通干线。当目录项为摄像机时可选。") + private Integer customPositionType; + + @Schema(description = "国标-摄像机光电成像类型。1-可见光成像;2-热成像;3-雷达成像;4-X光成像;5-深度光场成像;9-其他。可多值,") + private String customPhotoelectricImagingTyp; + + @Schema(description = "国标-摄像机采集部位类型") + private String customCapturePositionType; + + @Schema(description = "国标-摄像机安装位置室外、室内属性。1-室外、2-室内。") + private Integer customRoomType; + + // 2016 + @Schema(description = "国标-用途属性") + private Integer customUseType; + + @Schema(description = "国标-摄像机补光属性。1-无补光;2-红外补光;3-白光补光;4-激光补光;9-其他") + private Integer customSupplyLightType; + + @Schema(description = "国标-摄像机监视方位(光轴方向)属性。1-东(西向东)、2-西(东向西)、3-南(北向南)、4-北(南向北)、" + + "5-东南(西北到东南)、6-东北(西南到东北)、7-西南(东北到西南)、8-西北(东南到西北)") + private Integer customDirectionType; + + @Schema(description = "国标-摄像机支持的分辨率,可多值") + private String customResolution; + + // 2022 + @Schema(description = "国标-摄像机支持的码流编号列表,用于实时点播时指定码流编号(可选)") + private String customStreamNumberList; + + @Schema(description = "国标-下载倍速(可选),可多值") + private String customDownloadSpeed; + + @Schema(description = "国标-空域编码能力,取值0-不支持;1-1级增强(1个增强层);2-2级增强(2个增强层);3-3级增强(3个增强层)") + private Integer customSvcSpaceSupportMod; + + @Schema(description = "国标-时域编码能力,取值0-不支持;1-1级增强;2-2级增强;3-3级增强(可选)") + private Integer customSvcTimeSupportMode; + + // 2022 + @Schema(description = "国标- SSVC增强层与基本层比例能力 ") + private String customSsvcRatioSupportList; + + // 2022 + @Schema(description = "国标-移动采集设备类型(仅移动采集设备适用,必选);1-移动机器人载摄像机;2-执法记录仪;3-移动单兵设备;" + + "4-车载视频记录设备;5-无人机载摄像机;9-其他") + private Integer customMobileDeviceType; + + // 2022 + @Schema(description = "国标-摄像机水平视场角(可选),取值范围大于0度小于等于360度") + private Double customHorizontalFieldAngle; + + // 2022 + @Schema(description = "国标-摄像机竖直视场角(可选),取值范围大于0度小于等于360度 ") + private Double customVerticalFieldAngle; + + // 2022 + @Schema(description = "国标-摄像机可视距离(可选),单位:米") + private Double customMaxViewDistance; + + // 2022 + @Schema(description = "国标-基层组织编码(必选,非基层建设时为“000000”)") + private String customGrassrootsCode; + + // 2022 + @Schema(description = "国标-监控点位类型(当为摄像机时必选),1-一类视频监控点;2-二类视频监控点;3-三类视频监控点;9-其他点位。") + private Integer customPoType; + + // 2022 + @Schema(description = "国标-点位俗称") + private String customPoCommonName; + + // 2022 + @Schema(description = "国标-设备MAC地址(可选),用“XX-XX-XX-XX-XX-XX”格式表达") + private String customMac; + + // 2022 + @Schema(description = "国标-摄像机卡口功能类型,01-人脸卡口;02-人员卡口;03-机动车卡口;04-非机动车卡口;05-物品卡口;99-其他") + private String customFunctionType; + + // 2022 + @Schema(description = "国标-摄像机视频编码格式") + private String customEncodeType; + + // 2022 + @Schema(description = "国标-摄像机安装使用时间") + private String customInstallTime; + + // 2022 + @Schema(description = "国标-摄像机所属管理单位名称") + private String customManagementUnit; + + // 2022 + @Schema(description = "国标-摄像机所属管理单位联系人的联系方式(电话号码,可多值,用英文半角“/”分割)") + private String customContactInfo; + + // 2022 + @Schema(description = "国标-录像保存天数(可选)") + private Integer customRecordSaveDays; + + // 2022 + @Schema(description = "国标-国民经济行业分类代码(可选)") + private String customIndustrialClassification; + } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java index fd66ed78..7d7780f0 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java @@ -279,4 +279,12 @@ public class PlatformController { Assert.notEmpty(param.getDeviceIds(), "设备ID不可为空"); platformChannelService.removeChannelByDevice(param.getPlatformId(), param.getDeviceIds()); } + + @Operation(summary = "自定义共享通道信息", security = @SecurityRequirement(name = JwtUtils.HEADER)) + @PostMapping("/channel/custom/update") + @ResponseBody + public void updateCustomChannel(@RequestBody PlatformChannel channel) { + Assert.isTrue(channel.getId() > 0, "共享通道ID必须存在"); + platformChannelService.updateCustomChannel(channel); + } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java index 3fe02c02..f2b93d41 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java @@ -423,40 +423,40 @@ public interface CommonGBChannelMapper { " wdc.stream_proxy_id,\n" + " wdc.create_time,\n" + " wdc.update_time,\n" + - " coalesce(wpgc.device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + - " coalesce(wpgc.name, wdc.gb_name, wdc.name) as gb_name,\n" + - " coalesce(wpgc.manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + - " coalesce(wpgc.model, wdc.gb_model, wdc.model) as gb_model,\n" + - " coalesce(wpgc.owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + - " coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + - " coalesce(wpgc.block, wdc.gb_block, wdc.block) as gb_block,\n" + - " coalesce(wpgc.address, wdc.gb_address, wdc.address) as gb_address,\n" + - " coalesce(wpgc.parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + - " coalesce(wpgc.parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + - " coalesce(wpgc.safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + - " coalesce(wpgc.register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + - " coalesce(wpgc.cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + - " coalesce(wpgc.certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + - " coalesce(wpgc.err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + - " coalesce(wpgc.end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + - " coalesce(wpgc.secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + - " coalesce(wpgc.ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + - " coalesce(wpgc.port, wdc.gb_port, wdc.port) as gb_port,\n" + - " coalesce(wpgc.password, wdc.gb_password, wdc.password) as gb_password,\n" + - " coalesce(wpgc.status, wdc.gb_status, wdc.status) as gb_status,\n" + - " coalesce(wpgc.longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + - " coalesce(wpgc.latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + - " coalesce(wpgc.ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + - " coalesce(wpgc.position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + - " coalesce(wpgc.room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + - " coalesce(wpgc.use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + - " coalesce(wpgc.supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + - " coalesce(wpgc.direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + - " coalesce(wpgc.resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + - " coalesce(wpgc.business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + - " coalesce(wpgc.download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + - " coalesce(wpgc.svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + - " coalesce(wpgc.svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + + " coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + + " coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" + + " coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + + " coalesce(wpgc.custom_model, wdc.gb_model, wdc.model) as gb_model,\n" + + " coalesce(wpgc.custom_owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + + " coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + + " coalesce(wpgc.custom_block, wdc.gb_block, wdc.block) as gb_block,\n" + + " coalesce(wpgc.custom_address, wdc.gb_address, wdc.address) as gb_address,\n" + + " coalesce(wpgc.custom_parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + + " coalesce(wpgc.custom_parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + + " coalesce(wpgc.custom_safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + + " coalesce(wpgc.custom_register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + + " coalesce(wpgc.custom_cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + + " coalesce(wpgc.custom_certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + + " coalesce(wpgc.custom_err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + + " coalesce(wpgc.custom_end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + + " coalesce(wpgc.custom_secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + + " coalesce(wpgc.custom_ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + + " coalesce(wpgc.custom_port, wdc.gb_port, wdc.port) as gb_port,\n" + + " coalesce(wpgc.custom_password, wdc.gb_password, wdc.password) as gb_password,\n" + + " coalesce(wpgc.custom_status, wdc.gb_status, wdc.status) as gb_status,\n" + + " coalesce(wpgc.custom_longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + + " coalesce(wpgc.custom_latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + + " coalesce(wpgc.custom_ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + + " coalesce(wpgc.custom_position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + + " coalesce(wpgc.custom_room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + + " coalesce(wpgc.custom_use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + + " coalesce(wpgc.custom_supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + + " coalesce(wpgc.custom_direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + + " coalesce(wpgc.custom_resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + + " coalesce(wpgc.custom_business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + + " coalesce(wpgc.custom_download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + + " coalesce(wpgc.custom_svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + + " coalesce(wpgc.custom_svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + " from wvp_device_channel wdc" + " left join wvp_platform_channel wpgc on wdc.id = wpgc.device_channel_id" + " where wpgc.platform_id = #{platformId} " @@ -472,43 +472,43 @@ public interface CommonGBChannelMapper { " wdc.stream_proxy_id,\n" + " wdc.create_time,\n" + " wdc.update_time,\n" + - " coalesce(wpgc.device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + - " coalesce(wpgc.name, wdc.gb_name, wdc.name) as gb_name,\n" + - " coalesce(wpgc.manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + - " coalesce(wpgc.model, wdc.gb_model, wdc.model) as gb_model,\n" + - " coalesce(wpgc.owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + - " coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + - " coalesce(wpgc.block, wdc.gb_block, wdc.block) as gb_block,\n" + - " coalesce(wpgc.address, wdc.gb_address, wdc.address) as gb_address,\n" + - " coalesce(wpgc.parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + - " coalesce(wpgc.parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + - " coalesce(wpgc.safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + - " coalesce(wpgc.register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + - " coalesce(wpgc.cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + - " coalesce(wpgc.certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + - " coalesce(wpgc.err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + - " coalesce(wpgc.end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + - " coalesce(wpgc.secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + - " coalesce(wpgc.ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + - " coalesce(wpgc.port, wdc.gb_port, wdc.port) as gb_port,\n" + - " coalesce(wpgc.password, wdc.gb_password, wdc.password) as gb_password,\n" + - " coalesce(wpgc.status, wdc.gb_status, wdc.status) as gb_status,\n" + - " coalesce(wpgc.longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + - " coalesce(wpgc.latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + - " coalesce(wpgc.ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + - " coalesce(wpgc.position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + - " coalesce(wpgc.room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + - " coalesce(wpgc.use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + - " coalesce(wpgc.supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + - " coalesce(wpgc.direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + - " coalesce(wpgc.resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + - " coalesce(wpgc.business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + - " coalesce(wpgc.download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + - " coalesce(wpgc.svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + - " coalesce(wpgc.svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + + " coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + + " coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" + + " coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + + " coalesce(wpgc.custom_model, wdc.gb_model, wdc.model) as gb_model,\n" + + " coalesce(wpgc.custom_owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + + " coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + + " coalesce(wpgc.custom_block, wdc.gb_block, wdc.block) as gb_block,\n" + + " coalesce(wpgc.custom_address, wdc.gb_address, wdc.address) as gb_address,\n" + + " coalesce(wpgc.custom_parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + + " coalesce(wpgc.custom_parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + + " coalesce(wpgc.custom_safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + + " coalesce(wpgc.custom_register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + + " coalesce(wpgc.custom_cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + + " coalesce(wpgc.custom_certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + + " coalesce(wpgc.custom_err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + + " coalesce(wpgc.custom_end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + + " coalesce(wpgc.custom_secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + + " coalesce(wpgc.custom_ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + + " coalesce(wpgc.custom_port, wdc.gb_port, wdc.port) as gb_port,\n" + + " coalesce(wpgc.custom_password, wdc.gb_password, wdc.password) as gb_password,\n" + + " coalesce(wpgc.custom_status, wdc.gb_status, wdc.status) as gb_status,\n" + + " coalesce(wpgc.custom_longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + + " coalesce(wpgc.custom_latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + + " coalesce(wpgc.custom_ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + + " coalesce(wpgc.custom_position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + + " coalesce(wpgc.custom_room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + + " coalesce(wpgc.custom_use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + + " coalesce(wpgc.custom_supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + + " coalesce(wpgc.custom_direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + + " coalesce(wpgc.custom_resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + + " coalesce(wpgc.custom_business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + + " coalesce(wpgc.custom_download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + + " coalesce(wpgc.custom_svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + + " coalesce(wpgc.custom_svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + " from wvp_device_channel wdc" + " left join wvp_platform_channel wpgc on wdc.id = wpgc.device_channel_id " + - " where wpgc.platform_id = #{platformId} and coalesce(wpgc.parent_id, wdc.gb_parent_id, wdc.parent_id) = #{parentId}" + " where wpgc.platform_id = #{platformId} and coalesce(wpgc.custom_parent_id, wdc.gb_parent_id, wdc.parent_id) = #{parentId}" ) List queryShareChannelByParentId(@Param("parentId") String parentId, @Param("platformId") Integer platformId); @@ -521,43 +521,43 @@ public interface CommonGBChannelMapper { " wdc.stream_proxy_id,\n" + " wdc.create_time,\n" + " wdc.update_time,\n" + - " coalesce(wpgc.device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + - " coalesce(wpgc.name, wdc.gb_name, wdc.name) as gb_name,\n" + - " coalesce(wpgc.manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + - " coalesce(wpgc.model, wdc.gb_model, wdc.model) as gb_model,\n" + - " coalesce(wpgc.owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + - " coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + - " coalesce(wpgc.block, wdc.gb_block, wdc.block) as gb_block,\n" + - " coalesce(wpgc.address, wdc.gb_address, wdc.address) as gb_address,\n" + - " coalesce(wpgc.parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + - " coalesce(wpgc.parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + - " coalesce(wpgc.safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + - " coalesce(wpgc.register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + - " coalesce(wpgc.cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + - " coalesce(wpgc.certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + - " coalesce(wpgc.err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + - " coalesce(wpgc.end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + - " coalesce(wpgc.secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + - " coalesce(wpgc.ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + - " coalesce(wpgc.port, wdc.gb_port, wdc.port) as gb_port,\n" + - " coalesce(wpgc.password, wdc.gb_password, wdc.password) as gb_password,\n" + - " coalesce(wpgc.status, wdc.gb_status, wdc.status) as gb_status,\n" + - " coalesce(wpgc.longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + - " coalesce(wpgc.latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + - " coalesce(wpgc.ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + - " coalesce(wpgc.position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + - " coalesce(wpgc.room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + - " coalesce(wpgc.use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + - " coalesce(wpgc.supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + - " coalesce(wpgc.direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + - " coalesce(wpgc.resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + - " coalesce(wpgc.business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + - " coalesce(wpgc.download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + - " coalesce(wpgc.svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + - " coalesce(wpgc.svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + + " coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + + " coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" + + " coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + + " coalesce(wpgc.custom_model, wdc.gb_model, wdc.model) as gb_model,\n" + + " coalesce(wpgc.custom_owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + + " coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + + " coalesce(wpgc.custom_block, wdc.gb_block, wdc.block) as gb_block,\n" + + " coalesce(wpgc.custom_address, wdc.gb_address, wdc.address) as gb_address,\n" + + " coalesce(wpgc.custom_parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + + " coalesce(wpgc.custom_parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + + " coalesce(wpgc.custom_safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + + " coalesce(wpgc.custom_register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + + " coalesce(wpgc.custom_cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + + " coalesce(wpgc.custom_certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + + " coalesce(wpgc.custom_err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + + " coalesce(wpgc.custom_end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + + " coalesce(wpgc.custom_secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + + " coalesce(wpgc.custom_ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + + " coalesce(wpgc.custom_port, wdc.gb_port, wdc.port) as gb_port,\n" + + " coalesce(wpgc.custom_password, wdc.gb_password, wdc.password) as gb_password,\n" + + " coalesce(wpgc.custom_status, wdc.gb_status, wdc.status) as gb_status,\n" + + " coalesce(wpgc.custom_longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + + " coalesce(wpgc.custom_latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + + " coalesce(wpgc.custom_ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + + " coalesce(wpgc.custom_position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + + " coalesce(wpgc.custom_room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + + " coalesce(wpgc.custom_use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + + " coalesce(wpgc.custom_supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + + " coalesce(wpgc.custom_direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + + " coalesce(wpgc.custom_resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + + " coalesce(wpgc.custom_business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + + " coalesce(wpgc.custom_download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + + " coalesce(wpgc.custom_svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + + " coalesce(wpgc.custom_svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + " from wvp_device_channel wdc" + " left join wvp_platform_channel wpgc on wdc.id = wpgc.device_channel_id " + - " where wpgc.platform_id = #{platformId} and coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) = #{civilCode}" + " where wpgc.platform_id = #{platformId} and coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) = #{civilCode}" ) List queryShareChannelByCivilCode(@Param("civilCode") String civilCode, @Param("platformId") Integer platformId); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java index 9537b428..c42cd674 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformChannelMapper.java @@ -1,7 +1,6 @@ package com.genersoft.iot.vmp.gb28181.dao; import com.genersoft.iot.vmp.gb28181.bean.*; -import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; @@ -13,14 +12,6 @@ import java.util.Set; @Repository public interface PlatformChannelMapper { - /** - * 查询列表里已经关联的 - */ - @Select("") - List findChannelRelatedPlatform(@Param("platformId") String platformId, @Param("channelReduces") List channelReduces); @Insert("") int addChannels(@Param("platformId") Integer platformId, @Param("channelList") List channelList); - @Delete("") - int delChannelForGB(@Param("platformId") String platformId, @Param("channelReducesToDel") List channelReducesToDel); - @Delete("") int delChannelForDeviceId(String deviceId); - @Delete("") - int cleanChannelForGB(String platformId); - - @Select("SELECT dc.* from wvp_platform_channel pgc left join wvp_device_channel dc on dc.id = pgc.device_channel_id WHERE dc.channel_type = 0 and dc.channel_id=#{channelId} and pgc.platform_id=#{platformId}") - List queryChannelInParentPlatform(@Param("platformId") String platformId, @Param("channelId") String channelId); - @Select("select d.*\n" + "from wvp_platform_channel pgc\n" + " left join wvp_device_channel dc on dc.id = pgc.device_channel_id\n" + " left join wvp_device d on dc.device_id = d.device_id\n" + "where dc.channel_type = 0 and dc.channel_id = #{channelId} and pgc.platform_id=#{platformId}") - List queryVideoDeviceByPlatformIdAndChannelId(@Param("platformId") String platformId, @Param("channelId") String channelId); + List queryDeviceByPlatformIdAndChannelId(@Param("platformId") String platformId, @Param("channelId") String channelId); @Select(" ") List queryPlatFormListForGBWithGBId(@Param("channelId") String channelId, @Param("platforms") List platforms); - @Select("select dc.channel_id dc.device_id,dc.name,d.manufacturer,d.model,d.firmware\n" + + @Select("select dc.channel_id, dc.device_id,dc.name,d.manufacturer,d.model,d.firmware\n" + "from wvp_platform_channel pgc\n" + " left join wvp_device_channel dc on dc.id = pgc.device_channel_id\n" + " left join wvp_device d on dc.device_id = d.device_id\n" + @@ -88,59 +65,95 @@ public interface PlatformChannelMapper { @Select("") - List queryForPlatformSearch(@Param("platformId") Integer platformId, @Param("query") String query, + List queryForPlatformForWebList(@Param("platformId") Integer platformId, @Param("query") String query, @Param("online") Boolean online, @Param("hasShare") Boolean hasShare); @Select("select\n" + @@ -150,43 +163,43 @@ public interface PlatformChannelMapper { " wdc.stream_proxy_id,\n" + " wdc.create_time,\n" + " wdc.update_time,\n" + - " coalesce(wpgc.device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + - " coalesce(wpgc.name, wdc.gb_name, wdc.name) as gb_name,\n" + - " coalesce(wpgc.manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + - " coalesce(wpgc.model, wdc.gb_model, wdc.model) as gb_model,\n" + - " coalesce(wpgc.owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + - " coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + - " coalesce(wpgc.block, wdc.gb_block, wdc.block) as gb_block,\n" + - " coalesce(wpgc.address, wdc.gb_address, wdc.address) as gb_address,\n" + - " coalesce(wpgc.parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + - " coalesce(wpgc.parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + - " coalesce(wpgc.safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + - " coalesce(wpgc.register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + - " coalesce(wpgc.cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + - " coalesce(wpgc.certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + - " coalesce(wpgc.err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + - " coalesce(wpgc.end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + - " coalesce(wpgc.secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + - " coalesce(wpgc.ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + - " coalesce(wpgc.port, wdc.gb_port, wdc.port) as gb_port,\n" + - " coalesce(wpgc.password, wdc.gb_password, wdc.password) as gb_password,\n" + - " coalesce(wpgc.status, wdc.gb_status, wdc.status) as gb_status,\n" + - " coalesce(wpgc.longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + - " coalesce(wpgc.latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + - " coalesce(wpgc.ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + - " coalesce(wpgc.position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + - " coalesce(wpgc.room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + - " coalesce(wpgc.use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + - " coalesce(wpgc.supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + - " coalesce(wpgc.direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + - " coalesce(wpgc.resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + - " coalesce(wpgc.business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + - " coalesce(wpgc.download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + - " coalesce(wpgc.svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + - " coalesce(wpgc.svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + + " coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + + " coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" + + " coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + + " coalesce(wpgc.custom_model, wdc.gb_model, wdc.model) as gb_model,\n" + + " coalesce(wpgc.custom_owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + + " coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + + " coalesce(wpgc.custom_block, wdc.gb_block, wdc.block) as gb_block,\n" + + " coalesce(wpgc.custom_address, wdc.gb_address, wdc.address) as gb_address,\n" + + " coalesce(wpgc.custom_parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + + " coalesce(wpgc.custom_parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + + " coalesce(wpgc.custom_safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + + " coalesce(wpgc.custom_register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + + " coalesce(wpgc.custom_cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + + " coalesce(wpgc.custom_certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + + " coalesce(wpgc.custom_err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + + " coalesce(wpgc.custom_end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + + " coalesce(wpgc.custom_secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + + " coalesce(wpgc.custom_ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + + " coalesce(wpgc.custom_port, wdc.gb_port, wdc.port) as gb_port,\n" + + " coalesce(wpgc.custom_password, wdc.gb_password, wdc.password) as gb_password,\n" + + " coalesce(wpgc.custom_status, wdc.gb_status, wdc.status) as gb_status,\n" + + " coalesce(wpgc.custom_longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + + " coalesce(wpgc.custom_latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + + " coalesce(wpgc.custom_ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + + " coalesce(wpgc.custom_position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + + " coalesce(wpgc.custom_room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + + " coalesce(wpgc.custom_use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + + " coalesce(wpgc.custom_supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + + " coalesce(wpgc.custom_direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + + " coalesce(wpgc.custom_resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + + " coalesce(wpgc.custom_business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + + " coalesce(wpgc.custom_download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + + " coalesce(wpgc.custom_svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + + " coalesce(wpgc.custom_svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + " from wvp_device_channel wdc" + " left join wvp_platform_channel wpgc on wdc.id = wpgc.device_channel_id" + - " where wdc.channel_type = 0 and wpgc.platform_id = #{platformId} and coalesce(wpgc.device_id, wdc.gb_device_id, wdc.device_id) = #{channelDeviceId}" + " where wdc.channel_type = 0 and wpgc.platform_id = #{platformId} and coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) = #{channelDeviceId}" ) CommonGBChannel queryOneWithPlatform(@Param("platformId") Integer platformId, @Param("channelDeviceId") String channelDeviceId); @@ -200,40 +213,40 @@ public interface PlatformChannelMapper { " wdc.stream_proxy_id,\n" + " wdc.create_time,\n" + " wdc.update_time,\n" + - " coalesce(wpgc.device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + - " coalesce(wpgc.name, wdc.gb_name, wdc.name) as gb_name,\n" + - " coalesce(wpgc.manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + - " coalesce(wpgc.model, wdc.gb_model, wdc.model) as gb_model,\n" + - " coalesce(wpgc.owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + - " coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + - " coalesce(wpgc.block, wdc.gb_block, wdc.block) as gb_block,\n" + - " coalesce(wpgc.address, wdc.gb_address, wdc.address) as gb_address,\n" + - " coalesce(wpgc.parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + - " coalesce(wpgc.parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + - " coalesce(wpgc.safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + - " coalesce(wpgc.register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + - " coalesce(wpgc.cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + - " coalesce(wpgc.certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + - " coalesce(wpgc.err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + - " coalesce(wpgc.end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + - " coalesce(wpgc.secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + - " coalesce(wpgc.ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + - " coalesce(wpgc.port, wdc.gb_port, wdc.port) as gb_port,\n" + - " coalesce(wpgc.password, wdc.gb_password, wdc.password) as gb_password,\n" + - " coalesce(wpgc.status, wdc.gb_status, wdc.status) as gb_status,\n" + - " coalesce(wpgc.longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + - " coalesce(wpgc.latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + - " coalesce(wpgc.ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + - " coalesce(wpgc.position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + - " coalesce(wpgc.room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + - " coalesce(wpgc.use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + - " coalesce(wpgc.supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + - " coalesce(wpgc.direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + - " coalesce(wpgc.resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + - " coalesce(wpgc.business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + - " coalesce(wpgc.download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + - " coalesce(wpgc.svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + - " coalesce(wpgc.svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + + " coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + + " coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" + + " coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + + " coalesce(wpgc.custom_model, wdc.gb_model, wdc.model) as gb_model,\n" + + " coalesce(wpgc.custom_owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + + " coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + + " coalesce(wpgc.custom_block, wdc.gb_block, wdc.block) as gb_block,\n" + + " coalesce(wpgc.custom_address, wdc.gb_address, wdc.address) as gb_address,\n" + + " coalesce(wpgc.custom_parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + + " coalesce(wpgc.custom_parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + + " coalesce(wpgc.custom_safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + + " coalesce(wpgc.custom_register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + + " coalesce(wpgc.custom_cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + + " coalesce(wpgc.custom_certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + + " coalesce(wpgc.custom_err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + + " coalesce(wpgc.custom_end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + + " coalesce(wpgc.custom_secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + + " coalesce(wpgc.custom_ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + + " coalesce(wpgc.custom_port, wdc.gb_port, wdc.port) as gb_port,\n" + + " coalesce(wpgc.custom_password, wdc.gb_password, wdc.password) as gb_password,\n" + + " coalesce(wpgc.custom_status, wdc.gb_status, wdc.status) as gb_status,\n" + + " coalesce(wpgc.custom_longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + + " coalesce(wpgc.custom_latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + + " coalesce(wpgc.custom_ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + + " coalesce(wpgc.custom_position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + + " coalesce(wpgc.custom_room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + + " coalesce(wpgc.custom_use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + + " coalesce(wpgc.custom_supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + + " coalesce(wpgc.custom_direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + + " coalesce(wpgc.custom_resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + + " coalesce(wpgc.custom_business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + + " coalesce(wpgc.custom_download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + + " coalesce(wpgc.custom_svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + + " coalesce(wpgc.custom_svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + " from wvp_device_channel wdc" + " left join wvp_platform_channel wpgc on wdc.id = wpgc.device_channel_id and wpgc.platform_id = #{platformId}" + " where wdc.channel_type = 0 and wpgc.platform_id is null" + @@ -251,40 +264,40 @@ public interface PlatformChannelMapper { " wdc.stream_proxy_id,\n" + " wdc.create_time,\n" + " wdc.update_time,\n" + - " coalesce(wpgc.device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + - " coalesce(wpgc.name, wdc.gb_name, wdc.name) as gb_name,\n" + - " coalesce(wpgc.manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + - " coalesce(wpgc.model, wdc.gb_model, wdc.model) as gb_model,\n" + - " coalesce(wpgc.owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + - " coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + - " coalesce(wpgc.block, wdc.gb_block, wdc.block) as gb_block,\n" + - " coalesce(wpgc.address, wdc.gb_address, wdc.address) as gb_address,\n" + - " coalesce(wpgc.parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + - " coalesce(wpgc.parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + - " coalesce(wpgc.safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + - " coalesce(wpgc.register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + - " coalesce(wpgc.cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + - " coalesce(wpgc.certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + - " coalesce(wpgc.err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + - " coalesce(wpgc.end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + - " coalesce(wpgc.secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + - " coalesce(wpgc.ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + - " coalesce(wpgc.port, wdc.gb_port, wdc.port) as gb_port,\n" + - " coalesce(wpgc.password, wdc.gb_password, wdc.password) as gb_password,\n" + - " coalesce(wpgc.status, wdc.gb_status, wdc.status) as gb_status,\n" + - " coalesce(wpgc.longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + - " coalesce(wpgc.latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + - " coalesce(wpgc.ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + - " coalesce(wpgc.position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + - " coalesce(wpgc.room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + - " coalesce(wpgc.use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + - " coalesce(wpgc.supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + - " coalesce(wpgc.direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + - " coalesce(wpgc.resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + - " coalesce(wpgc.business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + - " coalesce(wpgc.download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + - " coalesce(wpgc.svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + - " coalesce(wpgc.svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + + " coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" + + " coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" + + " coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" + + " coalesce(wpgc.custom_model, wdc.gb_model, wdc.model) as gb_model,\n" + + " coalesce(wpgc.custom_owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" + + " coalesce(wpgc.custom_civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" + + " coalesce(wpgc.custom_block, wdc.gb_block, wdc.block) as gb_block,\n" + + " coalesce(wpgc.custom_address, wdc.gb_address, wdc.address) as gb_address,\n" + + " coalesce(wpgc.custom_parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" + + " coalesce(wpgc.custom_parent_id, wdc.gb_parent_id, wdc.parent_id) as gb_parent_id,\n" + + " coalesce(wpgc.custom_safety_way, wdc.gb_safety_way, wdc.safety_way) as gb_safety_way,\n" + + " coalesce(wpgc.custom_register_way, wdc.gb_register_way, wdc.register_way) as gb_register_way,\n" + + " coalesce(wpgc.custom_cert_num, wdc.gb_cert_num, wdc.cert_num) as gb_cert_num,\n" + + " coalesce(wpgc.custom_certifiable, wdc.gb_certifiable, wdc.certifiable) as gb_certifiable,\n" + + " coalesce(wpgc.custom_err_code, wdc.gb_err_code, wdc.err_code) as gb_err_code,\n" + + " coalesce(wpgc.custom_end_time, wdc.gb_end_time, wdc.end_time) as gb_end_time,\n" + + " coalesce(wpgc.custom_secrecy, wdc.gb_secrecy, wdc.secrecy) as gb_secrecy,\n" + + " coalesce(wpgc.custom_ip_address, wdc.gb_ip_address, wdc.ip_address) as gb_ip_address,\n" + + " coalesce(wpgc.custom_port, wdc.gb_port, wdc.port) as gb_port,\n" + + " coalesce(wpgc.custom_password, wdc.gb_password, wdc.password) as gb_password,\n" + + " coalesce(wpgc.custom_status, wdc.gb_status, wdc.status) as gb_status,\n" + + " coalesce(wpgc.custom_longitude, wdc.gb_longitude, wdc.longitude) as gb_longitude,\n" + + " coalesce(wpgc.custom_latitude, wdc.gb_latitude, wdc.latitude) as gb_latitude,\n" + + " coalesce(wpgc.custom_ptz_type, wdc.gb_ptz_type, wdc.ptz_type) as gb_ptz_type,\n" + + " coalesce(wpgc.custom_position_type, wdc.gb_position_type, wdc.position_type) as gb_position_type,\n" + + " coalesce(wpgc.custom_room_type, wdc.gb_room_type, wdc.room_type) as gb_room_type,\n" + + " coalesce(wpgc.custom_use_type, wdc.gb_use_type, wdc.use_type) as gb_use_type,\n" + + " coalesce(wpgc.custom_supply_light_type, wdc.gb_supply_light_type, wdc.supply_light_type) as gb_supply_light_type,\n" + + " coalesce(wpgc.custom_direction_type, wdc.gb_direction_type, wdc.direction_type) as gb_direction_type,\n" + + " coalesce(wpgc.custom_resolution, wdc.gb_resolution, wdc.resolution) as gb_resolution,\n" + + " coalesce(wpgc.custom_business_group_id, wdc.gb_business_group_id, wdc.business_group_id) as gb_business_group_id,\n" + + " coalesce(wpgc.custom_download_speed, wdc.gb_download_speed, wdc.download_speed) as gb_download_speed,\n" + + " coalesce(wpgc.custom_svc_space_support_mod, wdc.gb_svc_space_support_mod, wdc.svc_space_support_mod) as gb_svc_space_support_mod,\n" + + " coalesce(wpgc.custom_svc_time_support_mode, wdc.gb_svc_time_support_mode, wdc.svc_time_support_mode) as gb_svc_time_support_mode\n" + " from wvp_device_channel wdc" + " left join wvp_platform_channel wpgc on wdc.id = wpgc.device_channel_id" + " where wdc.channel_type = 0 and wpgc.platform_id = #{platformId}" + @@ -425,4 +438,93 @@ public interface PlatformChannelMapper { "DELETE from wvp_platform_region WHERE platform_id=#{platformId}" + "") void removePlatformRegionByPlatformId(@Param("platformId") Integer platformId); + + @Update(value = {" "}) + void updateCustomChannel(PlatformChannel channel); + + + @Select("") + CommonGBChannel queryShareChannel(@Param("platformId") int platformId, @Param("gbId") int gbId); } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformChannelService.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformChannelService.java index fe545c29..983fdf76 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformChannelService.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformChannelService.java @@ -34,4 +34,6 @@ public interface IPlatformChannelService { void addChannelByDevice(Integer platformId, List deviceIds); void removeChannelByDevice(Integer platformId, List deviceIds); + + void updateCustomChannel(PlatformChannel channel); } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformChannelServiceImpl.java index 0be964f6..eb09d7b0 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformChannelServiceImpl.java @@ -56,7 +56,7 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService { @Override public PageInfo queryChannelList(int page, int count, String query, Boolean online, Integer platformId, Boolean hasShare) { PageHelper.startPage(page, count); - List all = platformChannelMapper.queryForPlatformSearch(platformId, query, online, hasShare); + List all = platformChannelMapper.queryForPlatformForWebList(platformId, query, online, hasShare); return new PageInfo<>(all); } @@ -413,4 +413,18 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService { log.error("[命令发送失败] 国标级联 Catalog通知: {}", e.getMessage()); } } + + @Override + public void updateCustomChannel(PlatformChannel channel) { + platformChannelMapper.updateCustomChannel(channel); + CommonGBChannel commonGBChannel = platformChannelMapper.queryShareChannel(channel.getPlatformId(), channel.getGbId()); + // 发送消息 + try { + // 发送catalog + eventPublisher.catalogEventPublish(channel.getPlatformId(), commonGBChannel, CatalogEvent.UPDATE); + } catch (Exception e) { + log.warn("[自定义通道信息] 发送失败, 平台ID: {}, 通道: {}({})", channel.getPlatformId(), + channel.getGbName(), channel.getGbDeviceDbId(), e); + } + } } diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java index 726da75e..a26b17ce 100755 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java @@ -63,7 +63,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { @Override public Device queryVideoDeviceByPlatformIdAndChannelId(String platformId, String channelId) { - List devices = platformChannelMapper.queryVideoDeviceByPlatformIdAndChannelId(platformId, channelId); + List devices = platformChannelMapper.queryDeviceByPlatformIdAndChannelId(platformId, channelId); if (devices.size() > 1) { // 出现长度大于0的时候肯定是国标通道的ID重复了 log.warn("国标ID存在重复:{}", channelId); diff --git a/web_src/src/components/dialog/shareChannelAdd.vue b/web_src/src/components/dialog/shareChannelAdd.vue index 5fce8f59..30bd1fa8 100755 --- a/web_src/src/components/dialog/shareChannelAdd.vue +++ b/web_src/src/components/dialog/shareChannelAdd.vue @@ -51,6 +51,26 @@ + + + + + + + + + @@ -415,6 +435,31 @@ export default { }); }, + saveCustom: function (row) { + this.$axios({ + method: 'post', + url: `/api/platform/channel/custom/update`, + data: row + }).then((res)=> { + if (res.data.code === 0) { + this.$message.success({ + showClose: true, + message: "保存成功" + }) + this.initData() + }else { + this.$message.error({ + showClose: true, + message: res.data.msg + }) + } + }).catch((error)=> { + this.$message.error({ + showClose: true, + message: error + }) + }); + }, search: function () { this.currentPage = 1; this.total = 0; diff --git a/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql b/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql index 3d013db4..b49463b8 100644 --- a/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql +++ b/数据库/2.7.2-重构/初始化-mysql-2.7.2.sql @@ -285,45 +285,45 @@ create table wvp_platform create table wvp_platform_channel ( - id serial primary key, - platform_id integer, - device_channel_id integer, - device_id character varying(50), - name character varying(255), - manufacturer character varying(50), - model character varying(50), - owner character varying(50), - civil_code character varying(50), - block character varying(50), - address character varying(50), - parental integer, - parent_id character varying(50), - safety_way integer, - register_way integer, - cert_num character varying(50), - certifiable integer, - err_code integer, - end_time character varying(50), - secrecy integer, - ip_address character varying(50), - port integer, - password character varying(255), - status character varying(50), - longitude double precision, - latitude double precision, - ptz_type integer, - position_type integer, - room_type integer, - use_type integer, - supply_light_type integer, - direction_type integer, - resolution character varying(255), - business_group_id character varying(255), - download_speed character varying(255), - svc_space_support_mod integer, - svc_time_support_mode integer, + id serial primary key, + platform_id integer, + device_channel_id integer, + custom_device_id character varying(50), + custom_name character varying(255), + custom_manufacturer character varying(50), + custom_model character varying(50), + custom_owner character varying(50), + custom_civil_code character varying(50), + custom_block character varying(50), + custom_address character varying(50), + custom_parental integer, + custom_parent_id character varying(50), + custom_safety_way integer, + custom_register_way integer, + custom_cert_num character varying(50), + custom_certifiable integer, + custom_err_code integer, + custom_end_time character varying(50), + custom_secrecy integer, + custom_ip_address character varying(50), + custom_port integer, + custom_password character varying(255), + custom_status character varying(50), + custom_longitude double precision, + custom_latitude double precision, + custom_ptz_type integer, + custom_position_type integer, + custom_room_type integer, + custom_use_type integer, + custom_supply_light_type integer, + custom_direction_type integer, + custom_resolution character varying(255), + custom_business_group_id character varying(255), + custom_download_speed character varying(255), + custom_svc_space_support_mod integer, + custom_svc_time_support_mode integer, constraint uk_platform_gb_channel_platform_id_catalog_id_device_channel_id unique (platform_id, device_channel_id), - constraint uk_platform_gb_channel_device_id unique (device_id) + constraint uk_platform_gb_channel_device_id unique (custom_device_id) ); create table wvp_platform_group @@ -462,7 +462,7 @@ CREATE TABLE wvp_common_group business_group varchar(50) NOT NULL, create_time varchar(50) NOT NULL, update_time varchar(50) NOT NULL, - civil_code varchar(50) default null, + civil_code varchar(50) default null, UNIQUE KEY common_group_device_platform (device_id) );