优化mysql建库脚本
parent
10ae1bba59
commit
04f3511fb3
|
@ -46,7 +46,7 @@ create table device_channel
|
||||||
streamId varchar(50) null,
|
streamId varchar(50) null,
|
||||||
deviceId varchar(50) not null,
|
deviceId varchar(50) not null,
|
||||||
parental varchar(50) null,
|
parental varchar(50) null,
|
||||||
hasAudio tinyint(1) null,
|
hasAudio bit(1) null,
|
||||||
primary key (channelId, deviceId)
|
primary key (channelId, deviceId)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ create table parent_platform
|
||||||
characterSet varchar(50) null,
|
characterSet varchar(50) null,
|
||||||
ptz int null,
|
ptz int null,
|
||||||
rtcp int null,
|
rtcp int null,
|
||||||
status tinyint(1) null
|
status bit(1) null
|
||||||
);
|
);
|
||||||
|
|
||||||
create table platform_gb_channel
|
create table platform_gb_channel
|
||||||
|
@ -131,9 +131,9 @@ create table stream_proxy
|
||||||
timeout_ms int null,
|
timeout_ms int null,
|
||||||
ffmpeg_cmd_key varchar(50) null,
|
ffmpeg_cmd_key varchar(50) null,
|
||||||
rtp_type varchar(50) null,
|
rtp_type varchar(50) null,
|
||||||
enable_hls tinyint(1) null,
|
enable_hls bit(1) null,
|
||||||
enable_mp4 tinyint(1) null,
|
enable_mp4 bit(1) null,
|
||||||
enable tinyint(1) not null,
|
enable bit(1) not null,
|
||||||
primary key (app, stream)
|
primary key (app, stream)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -780,7 +780,9 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
logger.warn("收到[ "+deviceId+" ]心跳信息, 但是设备" + (device == null? "不存在":"离线") + ", 心跳信息不予以回复");
|
logger.warn("收到[ "+deviceId+" ]心跳信息, 但是设备" + (device == null? "不存在":"离线") + ", 回复401");
|
||||||
|
Response response = getMessageFactory().createResponse(Response.UNAUTHORIZED, evt.getRequest());
|
||||||
|
getServerTransaction(evt).sendResponse(response);
|
||||||
}
|
}
|
||||||
} catch (ParseException | SipException | InvalidArgumentException | DocumentException e) {
|
} catch (ParseException | SipException | InvalidArgumentException | DocumentException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -46,7 +46,7 @@ public interface DeviceChannelMapper {
|
||||||
"<if test=\"PTZType != null\">, PTZType=${PTZType}</if>" +
|
"<if test=\"PTZType != null\">, PTZType=${PTZType}</if>" +
|
||||||
"<if test=\"status != null\">, status='${status}'</if>" +
|
"<if test=\"status != null\">, status='${status}'</if>" +
|
||||||
"<if test=\"streamId != null\">, streamId='${streamId}'</if>" +
|
"<if test=\"streamId != null\">, streamId='${streamId}'</if>" +
|
||||||
"<if test=\"hasAudio != null\">, hasAudio='${hasAudio}'</if>" +
|
"<if test=\"hasAudio != null\">, hasAudio=${hasAudio}</if>" +
|
||||||
"WHERE deviceId='${deviceId}' AND channelId='${channelId}'"+
|
"WHERE deviceId='${deviceId}' AND channelId='${channelId}'"+
|
||||||
" </script>"})
|
" </script>"})
|
||||||
int update(DeviceChannel channel);
|
int update(DeviceChannel channel);
|
||||||
|
|
|
@ -13,8 +13,8 @@ spring:
|
||||||
timeout: 10000
|
timeout: 10000
|
||||||
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
|
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
|
||||||
datasource:
|
datasource:
|
||||||
# name: eiot
|
# name: wvp
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/eiot?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true
|
# url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true
|
||||||
# username:
|
# username:
|
||||||
# password:
|
# password:
|
||||||
# type: com.alibaba.druid.pool.DruidDataSource
|
# type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
|
Loading…
Reference in New Issue