From 0984290ca2a75cf0316c3ca312bf8026b4edcf3e Mon Sep 17 00:00:00 2001 From: xiaoxie <hotcoffie@163.com> Date: 星期三, 01 十二月 2021 22:45:38 +0800 Subject: [PATCH] 继续优化docker配置: 1.启动命令增加ASSIST_JVM_CONFIG和WVP_JVM_CONFIG两个字段,方便配置JVM参数 2.修复一处错误,application.yml media.stream-ip的值应该等于media.ip而不是之前的sip.ip --- src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java | 47 +++++++++++++++++++++++++++++++++-------------- 1 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java index 9a41522..68ad28d 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java @@ -1,7 +1,6 @@ package com.genersoft.iot.vmp.storager.dao; import com.genersoft.iot.vmp.gb28181.bean.Device; -import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; @@ -28,6 +27,12 @@ "ip," + "port," + "hostAddress," + + "expires," + + "registerTime," + + "keepaliveTime," + + "createTime," + + "updateTime," + + "charset," + "online" + ") VALUES (" + "#{deviceId}," + @@ -40,23 +45,35 @@ "#{ip}," + "#{port}," + "#{hostAddress}," + + "#{expires}," + + "#{registerTime}," + + "#{keepaliveTime}," + + "#{createTime}," + + "#{updateTime}," + + "#{charset}," + "#{online}" + ")") int add(Device device); - - @Update("UPDATE device " + - "SET name=#{name}, " + - "manufacturer=#{manufacturer}," + - "model=#{model}," + - "firmware=#{firmware}, " + - "transport=#{transport}," + - "streamMode=#{streamMode}, " + - "ip=#{ip}, " + - "port=#{port}, " + - "hostAddress=#{hostAddress}, " + - "online=#{online} " + - "WHERE deviceId=#{deviceId}") + @Update(value = {" <script>" + + "UPDATE device " + + "SET updateTime='${updateTime}'" + + "<if test=\"name != null\">, name='${name}'</if>" + + "<if test=\"manufacturer != null\">, manufacturer='${manufacturer}'</if>" + + "<if test=\"model != null\">, model='${model}'</if>" + + "<if test=\"firmware != null\">, firmware='${firmware}'</if>" + + "<if test=\"transport != null\">, transport='${transport}'</if>" + + "<if test=\"streamMode != null\">, streamMode='${streamMode}'</if>" + + "<if test=\"ip != null\">, ip='${ip}'</if>" + + "<if test=\"port != null\">, port=${port}</if>" + + "<if test=\"hostAddress != null\">, hostAddress='${hostAddress}'</if>" + + "<if test=\"online != null\">, online=${online}</if>" + + "<if test=\"registerTime != null\">, registerTime='${registerTime}'</if>" + + "<if test=\"keepaliveTime != null\">, keepaliveTime='${keepaliveTime}'</if>" + + "<if test=\"expires != null\">, expires=${expires}</if>" + + "<if test=\"charset != null\">, charset='${charset}'</if>" + + "WHERE deviceId='${deviceId}'"+ + " </script>"}) int update(Device device); @Select("SELECT *, (SELECT count(0) FROM device_channel WHERE deviceId=de.deviceId) as channelCount FROM device de") @@ -65,4 +82,6 @@ @Delete("DELETE FROM device WHERE deviceId=#{deviceId}") int del(String deviceId); + @Update("UPDATE device SET online=0") + int outlineForAll(); } -- Gitblit v1.8.0