From fcd79b9864b2dc2478bf3f660fae257af0844937 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 08 七月 2022 11:20:29 +0800 Subject: [PATCH] 用户表增加推流鉴权KEY --- src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java index b430ebb..fa8381c 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java @@ -15,10 +15,10 @@ public interface GbStreamMapper { @Insert("REPLACE INTO gb_stream (app, stream, gbId, name, " + - "longitude, latitude, streamType, mediaServerId, status, createStamp) VALUES" + + "longitude, latitude, streamType, mediaServerId, status, createTime) VALUES" + "('${app}', '${stream}', '${gbId}', '${name}', " + "'${longitude}', '${latitude}', '${streamType}', " + - "'${mediaServerId}', ${status}, ${createStamp})") + "'${mediaServerId}', ${status}, '${createTime}')") @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId") int add(GbStream gbStream); @@ -33,6 +33,19 @@ "mediaServerId=#{mediaServerId}," + "status=${status} " + "WHERE app=#{app} AND stream=#{stream}") + int updateByAppAndStream(GbStream gbStream); + + @Update("UPDATE gb_stream " + + "SET app=#{app}," + + "stream=#{stream}," + + "gbId=#{gbId}," + + "name=#{name}," + + "streamType=#{streamType}," + + "longitude=#{longitude}, " + + "latitude=#{latitude}," + + "mediaServerId=#{mediaServerId}," + + "status=${status} " + + "WHERE gbStreamId=#{gbStreamId}") int update(GbStream gbStream); @Delete("DELETE FROM gb_stream WHERE app=#{app} AND stream=#{stream}") @@ -107,12 +120,12 @@ @Insert("<script> " + "INSERT IGNORE into gb_stream " + "(app, stream, gbId, name, " + - "longitude, latitude, streamType, mediaServerId, status, createStamp)" + + "longitude, latitude, streamType, mediaServerId, status, createTime)" + "values " + "<foreach collection='subList' index='index' item='item' separator=','> " + "('${item.app}', '${item.stream}', '${item.gbId}', '${item.name}', " + "'${item.longitude}', '${item.latitude}', '${item.streamType}', " + - "'${item.mediaServerId}', ${item.status}, ${item.createStamp}) "+ + "'${item.mediaServerId}', ${item.status}, '${item.createTime}') "+ "</foreach> " + "</script>") @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId") -- Gitblit v1.8.0