|  |  |  | 
|---|
|  |  |  | package com.genersoft.iot.vmp.storager.dao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.Device; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.bean.ResourceBaceInfo; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.*; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | "transport," + | 
|---|
|  |  |  | "streamMode," + | 
|---|
|  |  |  | "ip," + | 
|---|
|  |  |  | "sdpIp," + | 
|---|
|  |  |  | "localIp," + | 
|---|
|  |  |  | "port," + | 
|---|
|  |  |  | "hostAddress," + | 
|---|
|  |  |  | "expires," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "transport," + | 
|---|
|  |  |  | "streamMode," + | 
|---|
|  |  |  | "ip," + | 
|---|
|  |  |  | "sdpIp," + | 
|---|
|  |  |  | "localIp," + | 
|---|
|  |  |  | "port," + | 
|---|
|  |  |  | "hostAddress," + | 
|---|
|  |  |  | "expires," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "#{transport}," + | 
|---|
|  |  |  | "#{streamMode}," + | 
|---|
|  |  |  | "#{ip}," + | 
|---|
|  |  |  | "#{sdpIp}," + | 
|---|
|  |  |  | "#{localIp}," + | 
|---|
|  |  |  | "#{port}," + | 
|---|
|  |  |  | "#{hostAddress}," + | 
|---|
|  |  |  | "#{expires}," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "<if test=\"firmware != null\">, firmware='${firmware}'</if>" + | 
|---|
|  |  |  | "<if test=\"transport != null\">, transport='${transport}'</if>" + | 
|---|
|  |  |  | "<if test=\"ip != null\">, ip='${ip}'</if>" + | 
|---|
|  |  |  | "<if test=\"localIp != null\">, localIp='${localIp}'</if>" + | 
|---|
|  |  |  | "<if test=\"port != null\">, port=${port}</if>" + | 
|---|
|  |  |  | "<if test=\"hostAddress != null\">, hostAddress='${hostAddress}'</if>" + | 
|---|
|  |  |  | "<if test=\"online != null\">, online=${online}</if>" + | 
|---|
|  |  |  | 
|---|
|  |  |  | "transport," + | 
|---|
|  |  |  | "streamMode," + | 
|---|
|  |  |  | "ip," + | 
|---|
|  |  |  | "sdpIp," + | 
|---|
|  |  |  | "localIp," + | 
|---|
|  |  |  | "port," + | 
|---|
|  |  |  | "hostAddress," + | 
|---|
|  |  |  | "expires," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "transport," + | 
|---|
|  |  |  | "streamMode," + | 
|---|
|  |  |  | "ip," + | 
|---|
|  |  |  | "sdpIp," + | 
|---|
|  |  |  | "localIp," + | 
|---|
|  |  |  | "port," + | 
|---|
|  |  |  | "hostAddress," + | 
|---|
|  |  |  | "expires," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "transport," + | 
|---|
|  |  |  | "streamMode," + | 
|---|
|  |  |  | "ip," + | 
|---|
|  |  |  | "sdpIp," + | 
|---|
|  |  |  | "localIp," + | 
|---|
|  |  |  | "port," + | 
|---|
|  |  |  | "hostAddress," + | 
|---|
|  |  |  | "expires," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "<if test=\"password != null\">, password='${password}'</if>" + | 
|---|
|  |  |  | "<if test=\"streamMode != null\">, streamMode='${streamMode}'</if>" + | 
|---|
|  |  |  | "<if test=\"ip != null\">, ip='${ip}'</if>" + | 
|---|
|  |  |  | "<if test=\"sdpIp != null\">, sdpIp='${sdpIp}'</if>" + | 
|---|
|  |  |  | "<if test=\"port != null\">, port=${port}</if>" + | 
|---|
|  |  |  | "<if test=\"charset != null\">, charset='${charset}'</if>" + | 
|---|
|  |  |  | "<if test=\"subscribeCycleForCatalog != null\">, subscribeCycleForCatalog=${subscribeCycleForCatalog}</if>" + | 
|---|
|  |  |  | 
|---|
|  |  |  | "deviceId, " + | 
|---|
|  |  |  | "custom_name, " + | 
|---|
|  |  |  | "password, " + | 
|---|
|  |  |  | "sdpIp, " + | 
|---|
|  |  |  | "createTime," + | 
|---|
|  |  |  | "updateTime," + | 
|---|
|  |  |  | "charset," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "#{deviceId}," + | 
|---|
|  |  |  | "#{name}," + | 
|---|
|  |  |  | "#{password}," + | 
|---|
|  |  |  | "#{sdpIp}," + | 
|---|
|  |  |  | "#{createTime}," + | 
|---|
|  |  |  | "#{updateTime}," + | 
|---|
|  |  |  | "#{charset}," + | 
|---|
|  |  |  | 
|---|
|  |  |  | "#{online}" + | 
|---|
|  |  |  | ")") | 
|---|
|  |  |  | void addCustomDevice(Device device); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Select("select count(1) as total, sum(online) as online from device") | 
|---|
|  |  |  | ResourceBaceInfo getOverview(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|