Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0

This commit is contained in:
648540858 2023-01-05 17:49:50 +08:00
commit 936cd6fd0e
15 changed files with 256 additions and 256 deletions

View File

@ -16,19 +16,19 @@ import java.util.List;
public interface DeviceAlarmMapper { public interface DeviceAlarmMapper {
@Insert("INSERT INTO device_alarm (deviceId, channelId, alarmPriority, alarmMethod, alarmTime, alarmDescription, longitude, latitude, alarmType , createTime ) " + @Insert("INSERT INTO device_alarm (deviceId, channelId, alarmPriority, alarmMethod, alarmTime, alarmDescription, longitude, latitude, alarmType , createTime ) " +
"VALUES ('${deviceId}', '${channelId}', '${alarmPriority}', '${alarmMethod}', '${alarmTime}', '${alarmDescription}', ${longitude}, ${latitude}, '${alarmType}', '${createTime}')") "VALUES (#{deviceId}, #{channelId}, #{alarmPriority}, #{alarmMethod}, #{alarmTime}, #{alarmDescription}, #{longitude}, #{latitude}, #{alarmType}, #{createTime})")
int add(DeviceAlarm alarm); int add(DeviceAlarm alarm);
@Select(value = {" <script>" + @Select(value = {" <script>" +
" SELECT * FROM device_alarm " + " SELECT * FROM device_alarm " +
" WHERE 1=1 " + " WHERE 1=1 " +
" <if test=\"deviceId != null\" > AND deviceId = '${deviceId}'</if>" + " <if test=\"deviceId != null\" > AND deviceId = #{deviceId}</if>" +
" <if test=\"alarmPriority != null\" > AND alarmPriority = '${alarmPriority}' </if>" + " <if test=\"alarmPriority != null\" > AND alarmPriority = #{alarmPriority} </if>" +
" <if test=\"alarmMethod != null\" > AND alarmMethod = '${alarmMethod}' </if>" + " <if test=\"alarmMethod != null\" > AND alarmMethod = #{alarmMethod} </if>" +
" <if test=\"alarmType != null\" > AND alarmType = '${alarmType}' </if>" + " <if test=\"alarmType != null\" > AND alarmType = #{alarmType} </if>" +
" <if test=\"startTime != null\" > AND alarmTime &gt;= '${startTime}' </if>" + " <if test=\"startTime != null\" > AND alarmTime &gt;= #{startTime} </if>" +
" <if test=\"endTime != null\" > AND alarmTime &lt;= '${endTime}' </if>" + " <if test=\"endTime != null\" > AND alarmTime &lt;= #{endTime} </if>" +
" ORDER BY alarmTime ASC " + " ORDER BY alarmTime ASC " +
" </script>"}) " </script>"})
List<DeviceAlarm> query(String deviceId, String alarmPriority, String alarmMethod, List<DeviceAlarm> query(String deviceId, String alarmPriority, String alarmMethod,
@ -38,10 +38,10 @@ public interface DeviceAlarmMapper {
@Delete(" <script>" + @Delete(" <script>" +
"DELETE FROM device_alarm WHERE 1=1 " + "DELETE FROM device_alarm WHERE 1=1 " +
" <if test=\"deviceIdList != null and id == null \" > AND deviceId in " + " <if test=\"deviceIdList != null and id == null \" > AND deviceId in " +
"<foreach collection='deviceIdList' item='item' open='(' separator=',' close=')' > '${item}'</foreach>" + "<foreach collection='deviceIdList' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
"</if>" + "</if>" +
" <if test=\"time != null and id == null \" > AND alarmTime &lt;= '${time}'</if>" + " <if test=\"time != null and id == null \" > AND alarmTime &lt;= #{time}</if>" +
" <if test=\"id != null\" > AND id = ${id}</if>" + " <if test=\"id != null\" > AND id = #{id}</if>" +
" </script>" " </script>"
) )
int clearAlarmBeforeTime(Integer id, List<String> deviceIdList, String time); int clearAlarmBeforeTime(Integer id, List<String> deviceIdList, String time);

View File

@ -20,46 +20,46 @@ public interface DeviceChannelMapper {
"address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " + "address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " +
"ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " + "ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " +
"longitudeWgs84, latitudeWgs84, hasAudio, createTime, updateTime, businessGroupId, gpsTime) " + "longitudeWgs84, latitudeWgs84, hasAudio, createTime, updateTime, businessGroupId, gpsTime) " +
"VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," + "VALUES (#{channelId}, #{deviceId}, #{name}, #{manufacture}, #{model}, #{owner}, #{civilCode}, #{block}," +
"'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " + "#{address}, #{parental}, #{parentId}, #{safetyWay}, #{registerWay}, #{certNum}, #{certifiable}, #{errCode}, #{secrecy}, " +
"'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude}, ${longitudeGcj02}, " + "#{ipAddress}, #{port}, #{password}, #{PTZType}, #{status}, #{streamId}, #{longitude}, #{latitude}, #{longitudeGcj02}, " +
"${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84}, ${hasAudio}, '${createTime}', '${updateTime}', '${businessGroupId}', '${gpsTime}')") "#{latitudeGcj02}, #{longitudeWgs84}, #{latitudeWgs84}, #{hasAudio}, #{createTime}, #{updateTime}, #{businessGroupId}, #{gpsTime})")
int add(DeviceChannel channel); int add(DeviceChannel channel);
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE device_channel " + "UPDATE device_channel " +
"SET updateTime='${updateTime}'" + "SET updateTime=#{updateTime}" +
"<if test='name != null'>, name='${name}'</if>" + "<if test='name != null'>, name=#{name}</if>" +
"<if test='manufacture != null'>, manufacture='${manufacture}'</if>" + "<if test='manufacture != null'>, manufacture=#{manufacture}</if>" +
"<if test='model != null'>, model='${model}'</if>" + "<if test='model != null'>, model=#{model}</if>" +
"<if test='owner != null'>, owner='${owner}'</if>" + "<if test='owner != null'>, owner=#{owner}</if>" +
"<if test='civilCode != null'>, civilCode='${civilCode}'</if>" + "<if test='civilCode != null'>, civilCode=#{civilCode}</if>" +
"<if test='block != null'>, block='${block}'</if>" + "<if test='block != null'>, block=#{block}</if>" +
"<if test='address != null'>, address='${address}'</if>" + "<if test='address != null'>, address=#{address}</if>" +
"<if test='parental != null'>, parental=${parental}</if>" + "<if test='parental != null'>, parental=#{parental}</if>" +
"<if test='parentId != null'>, parentId='${parentId}'</if>" + "<if test='parentId != null'>, parentId=#{parentId}</if>" +
"<if test='safetyWay != null'>, safetyWay=${safetyWay}</if>" + "<if test='safetyWay != null'>, safetyWay=#{safetyWay}</if>" +
"<if test='registerWay != null'>, registerWay=${registerWay}</if>" + "<if test='registerWay != null'>, registerWay=#{registerWay}</if>" +
"<if test='certNum != null'>, certNum='${certNum}'</if>" + "<if test='certNum != null'>, certNum=#{certNum}</if>" +
"<if test='certifiable != null'>, certifiable=${certifiable}</if>" + "<if test='certifiable != null'>, certifiable=#{certifiable}</if>" +
"<if test='errCode != null'>, errCode=${errCode}</if>" + "<if test='errCode != null'>, errCode=#{errCode}</if>" +
"<if test='secrecy != null'>, secrecy='${secrecy}'</if>" + "<if test='secrecy != null'>, secrecy=#{secrecy}</if>" +
"<if test='ipAddress != null'>, ipAddress='${ipAddress}'</if>" + "<if test='ipAddress != null'>, ipAddress=#{ipAddress}</if>" +
"<if test='port != null'>, port=${port}</if>" + "<if test='port != null'>, port=#{port}</if>" +
"<if test='password != null'>, password='${password}'</if>" + "<if test='password != null'>, password=#{password}</if>" +
"<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>" +
"<if test='longitude != null'>, longitude=${longitude}</if>" + "<if test='longitude != null'>, longitude=#{longitude}</if>" +
"<if test='latitude != null'>, latitude=${latitude}</if>" + "<if test='latitude != null'>, latitude=#{latitude}</if>" +
"<if test='longitudeGcj02 != null'>, longitudeGcj02=${longitudeGcj02}</if>" + "<if test='longitudeGcj02 != null'>, longitudeGcj02=#{longitudeGcj02}</if>" +
"<if test='latitudeGcj02 != null'>, latitudeGcj02=${latitudeGcj02}</if>" + "<if test='latitudeGcj02 != null'>, latitudeGcj02=#{latitudeGcj02}</if>" +
"<if test='longitudeWgs84 != null'>, longitudeWgs84=${longitudeWgs84}</if>" + "<if test='longitudeWgs84 != null'>, longitudeWgs84=#{longitudeWgs84}</if>" +
"<if test='latitudeWgs84 != null'>, latitudeWgs84=${latitudeWgs84}</if>" + "<if test='latitudeWgs84 != null'>, latitudeWgs84=#{latitudeWgs84}</if>" +
"<if test='businessGroupId != null'>, businessGroupId=#{businessGroupId}</if>" + "<if test='businessGroupId != null'>, businessGroupId=#{businessGroupId}</if>" +
"<if test='gpsTime != null'>, gpsTime=#{gpsTime}</if>" + "<if test='gpsTime != null'>, gpsTime=#{gpsTime}</if>" +
"WHERE deviceId='${deviceId}' AND channelId='${channelId}'"+ "WHERE deviceId=#{deviceId} AND channelId=#{channelId}"+
" </script>"}) " </script>"})
int update(DeviceChannel channel); int update(DeviceChannel channel);
@ -70,7 +70,7 @@ public interface DeviceChannelMapper {
"device_channel dc " + "device_channel dc " +
"WHERE " + "WHERE " +
"dc.deviceId = #{deviceId} " + "dc.deviceId = #{deviceId} " +
" <if test='query != null'> AND (dc.channelId LIKE '%${query}%' OR dc.name LIKE '%${query}%' OR dc.name LIKE '%${query}%')</if> " + " <if test='query != null'> AND (dc.channelId LIKE concat('%',#{query},'%') OR dc.name LIKE concat('%',#{query},'%') OR dc.name LIKE concat('%',#{query},'%'))</if> " +
" <if test='parentChannelId != null'> AND (dc.parentId=#{parentChannelId} OR dc.civilCode = #{parentChannelId}) </if> " + " <if test='parentChannelId != null'> AND (dc.parentId=#{parentChannelId} OR dc.civilCode = #{parentChannelId}) </if> " +
" <if test='online == true' > AND dc.status=1</if>" + " <if test='online == true' > AND dc.status=1</if>" +
" <if test='online == false' > AND dc.status=0</if>" + " <if test='online == false' > AND dc.status=0</if>" +
@ -113,7 +113,7 @@ public interface DeviceChannelMapper {
" LEFT JOIN device de ON dc.deviceId = de.deviceId " + " LEFT JOIN device de ON dc.deviceId = de.deviceId " +
" LEFT JOIN platform_gb_channel pgc on pgc.deviceChannelId = dc.id " + " LEFT JOIN platform_gb_channel pgc on pgc.deviceChannelId = dc.id " +
" WHERE 1=1 " + " WHERE 1=1 " +
" <if test='query != null'> AND (dc.channelId LIKE '%${query}%' OR dc.name LIKE '%${query}%' OR dc.name LIKE '%${query}%')</if> " + " <if test='query != null'> AND (dc.channelId LIKE concat('%',#{query},'%') OR dc.name LIKE concat('%',#{query},'%') OR dc.name LIKE concat('%',#{query},'%'))</if> " +
" <if test='online == true' > AND dc.status=1</if> " + " <if test='online == true' > AND dc.status=1</if> " +
" <if test='online == false' > AND dc.status=0</if> " + " <if test='online == false' > AND dc.status=0</if> " +
" <if test='hasSubChannel!= null and hasSubChannel == true' > AND dc.subCount > 0</if> " + " <if test='hasSubChannel!= null and hasSubChannel == true' > AND dc.subCount > 0</if> " +
@ -154,14 +154,14 @@ public interface DeviceChannelMapper {
" longitudeWgs84, latitudeWgs84, hasAudio, createTime, updateTime, businessGroupId, gpsTime) " + " longitudeWgs84, latitudeWgs84, hasAudio, createTime, updateTime, businessGroupId, gpsTime) " +
"values " + "values " +
"<foreach collection='addChannels' index='index' item='item' separator=','> " + "<foreach collection='addChannels' index='index' item='item' separator=','> " +
"('${item.channelId}', '${item.deviceId}', '${item.name}', '${item.manufacture}', '${item.model}', " + "(#{item.channelId}, #{item.deviceId}, #{item.name}, #{item.manufacture}, #{item.model}, " +
"'${item.owner}', '${item.civilCode}', '${item.block}',${item.subCount}," + "#{item.owner}, #{item.civilCode}, #{item.block},#{item.subCount}," +
"'${item.address}', ${item.parental}, '${item.parentId}', ${item.safetyWay}, ${item.registerWay}, " + "#{item.address}, #{item.parental}, #{item.parentId}, #{item.safetyWay}, #{item.registerWay}, " +
"'${item.certNum}', ${item.certifiable}, ${item.errCode}, '${item.secrecy}', " + "#{item.certNum}, #{item.certifiable}, #{item.errCode}, #{item.secrecy}, " +
"'${item.ipAddress}', ${item.port}, '${item.password}', ${item.PTZType}, ${item.status}, " + "#{item.ipAddress}, #{item.port}, #{item.password}, #{item.PTZType}, #{item.status}, " +
"'${item.streamId}', ${item.longitude}, ${item.latitude},${item.longitudeGcj02}, " + "#{item.streamId}, #{item.longitude}, #{item.latitude},#{item.longitudeGcj02}, " +
"${item.latitudeGcj02},${item.longitudeWgs84}, ${item.latitudeWgs84}, ${item.hasAudio},'${item.createTime}', '${item.updateTime}', " + "#{item.latitudeGcj02},#{item.longitudeWgs84}, #{item.latitudeWgs84}, #{item.hasAudio}, now(), now(), " +
"'${item.businessGroupId}', '${item.gpsTime}') " + "#{item.businessGroupId}, #{item.gpsTime}) " +
"</foreach> " + "</foreach> " +
"ON DUPLICATE KEY UPDATE " + "ON DUPLICATE KEY UPDATE " +
"updateTime=VALUES(updateTime), " + "updateTime=VALUES(updateTime), " +
@ -206,39 +206,39 @@ public interface DeviceChannelMapper {
"<foreach collection='updateChannels' item='item' separator=';'>" + "<foreach collection='updateChannels' item='item' separator=';'>" +
" UPDATE" + " UPDATE" +
" device_channel" + " device_channel" +
" SET updateTime='${item.updateTime}'" + " SET updateTime=#{item.updateTime}" +
"<if test='item.name != null'>, name='${item.name}'</if>" + "<if test='item.name != null'>, name=#{item.name}</if>" +
"<if test='item.manufacture != null'>, manufacture='${item.manufacture}'</if>" + "<if test='item.manufacture != null'>, manufacture=#{item.manufacture}</if>" +
"<if test='item.model != null'>, model='${item.model}'</if>" + "<if test='item.model != null'>, model=#{item.model}</if>" +
"<if test='item.owner != null'>, owner='${item.owner}'</if>" + "<if test='item.owner != null'>, owner=#{item.owner}</if>" +
"<if test='item.civilCode != null'>, civilCode='${item.civilCode}'</if>" + "<if test='item.civilCode != null'>, civilCode=#{item.civilCode}</if>" +
"<if test='item.block != null'>, block='${item.block}'</if>" + "<if test='item.block != null'>, block=#{item.block}</if>" +
"<if test='item.subCount != null'>, block=${item.subCount}</if>" + "<if test='item.subCount != null'>, block=#{item.subCount}</if>" +
"<if test='item.address != null'>, address='${item.address}'</if>" + "<if test='item.address != null'>, address=#{item.address}</if>" +
"<if test='item.parental != null'>, parental=${item.parental}</if>" + "<if test='item.parental != null'>, parental=#{item.parental}</if>" +
"<if test='item.parentId != null'>, parentId='${item.parentId}'</if>" + "<if test='item.parentId != null'>, parentId=#{item.parentId}</if>" +
"<if test='item.safetyWay != null'>, safetyWay=${item.safetyWay}</if>" + "<if test='item.safetyWay != null'>, safetyWay=#{item.safetyWay}</if>" +
"<if test='item.registerWay != null'>, registerWay=${item.registerWay}</if>" + "<if test='item.registerWay != null'>, registerWay=#{item.registerWay}</if>" +
"<if test='item.certNum != null'>, certNum='${item.certNum}'</if>" + "<if test='item.certNum != null'>, certNum=#{item.certNum}</if>" +
"<if test='item.certifiable != null'>, certifiable=${item.certifiable}</if>" + "<if test='item.certifiable != null'>, certifiable=#{item.certifiable}</if>" +
"<if test='item.errCode != null'>, errCode=${item.errCode}</if>" + "<if test='item.errCode != null'>, errCode=#{item.errCode}</if>" +
"<if test='item.secrecy != null'>, secrecy='${item.secrecy}'</if>" + "<if test='item.secrecy != null'>, secrecy=#{item.secrecy}</if>" +
"<if test='item.ipAddress != null'>, ipAddress='${item.ipAddress}'</if>" + "<if test='item.ipAddress != null'>, ipAddress=#{item.ipAddress}</if>" +
"<if test='item.port != null'>, port=${item.port}</if>" + "<if test='item.port != null'>, port=#{item.port}</if>" +
"<if test='item.password != null'>, password='${item.password}'</if>" + "<if test='item.password != null'>, password=#{item.password}</if>" +
"<if test='item.PTZType != null'>, PTZType=${item.PTZType}</if>" + "<if test='item.PTZType != null'>, PTZType=#{item.PTZType}</if>" +
"<if test='item.status != null'>, status='${item.status}'</if>" + "<if test='item.status != null'>, status=#{item.status}</if>" +
"<if test='item.streamId != null'>, streamId='${item.streamId}'</if>" + "<if test='item.streamId != null'>, streamId=#{item.streamId}</if>" +
"<if test='item.hasAudio != null'>, hasAudio=${item.hasAudio}</if>" + "<if test='item.hasAudio != null'>, hasAudio=#{item.hasAudio}</if>" +
"<if test='item.longitude != null'>, longitude=${item.longitude}</if>" + "<if test='item.longitude != null'>, longitude=#{item.longitude}</if>" +
"<if test='item.latitude != null'>, latitude=${item.latitude}</if>" + "<if test='item.latitude != null'>, latitude=#{item.latitude}</if>" +
"<if test='item.longitudeGcj02 != null'>, longitudeGcj02=${item.longitudeGcj02}</if>" + "<if test='item.longitudeGcj02 != null'>, longitudeGcj02=#{item.longitudeGcj02}</if>" +
"<if test='item.latitudeGcj02 != null'>, latitudeGcj02=${item.latitudeGcj02}</if>" + "<if test='item.latitudeGcj02 != null'>, latitudeGcj02=#{item.latitudeGcj02}</if>" +
"<if test='item.longitudeWgs84 != null'>, longitudeWgs84=${item.longitudeWgs84}</if>" + "<if test='item.longitudeWgs84 != null'>, longitudeWgs84=#{item.longitudeWgs84}</if>" +
"<if test='item.latitudeWgs84 != null'>, latitudeWgs84=${item.latitudeWgs84}</if>" + "<if test='item.latitudeWgs84 != null'>, latitudeWgs84=#{item.latitudeWgs84}</if>" +
"<if test='item.businessGroupId != null'>, businessGroupId=#{item.businessGroupId}</if>" + "<if test='item.businessGroupId != null'>, businessGroupId=#{item.businessGroupId}</if>" +
"<if test='item.gpsTime != null'>, gpsTime=#{item.gpsTime}</if>" + "<if test='item.gpsTime != null'>, gpsTime=#{item.gpsTime}</if>" +
"WHERE deviceId='${item.deviceId}' AND channelId='${item.channelId}'"+ "WHERE deviceId=#{item.deviceId} AND channelId=#{item.channelId}"+
"</foreach>" + "</foreach>" +
"</script>"}) "</script>"})
int batchUpdate(List<DeviceChannel> updateChannels); int batchUpdate(List<DeviceChannel> updateChannels);
@ -251,7 +251,7 @@ public interface DeviceChannelMapper {
"device_channel dc1 " + "device_channel dc1 " +
"WHERE " + "WHERE " +
"dc1.deviceId = #{deviceId} " + "dc1.deviceId = #{deviceId} " +
" <if test='query != null'> AND (dc1.channelId LIKE '%${query}%' OR dc1.name LIKE '%${query}%' OR dc1.name LIKE '%${query}%')</if> " + " <if test='query != null'> AND (dc1.channelId LIKE concat('%',#{query},'%') OR dc1.name LIKE concat('%',#{query},'%') OR dc1.name LIKE concat('%',#{query},'%'))</if> " +
" <if test='parentChannelId != null'> AND dc1.parentId=#{parentChannelId} </if> " + " <if test='parentChannelId != null'> AND dc1.parentId=#{parentChannelId} </if> " +
" <if test='online == true' > AND dc1.status=1</if>" + " <if test='online == true' > AND dc1.status=1</if>" +
" <if test='online == false' > AND dc1.status=0</if>" + " <if test='online == false' > AND dc1.status=0</if>" +
@ -292,13 +292,13 @@ public interface DeviceChannelMapper {
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE device_channel " + "UPDATE device_channel " +
"SET " + "SET " +
"latitude=${latitude}, " + "latitude=#{latitude}, " +
"longitude=${longitude}, " + "longitude=#{longitude}, " +
"longitudeGcj02=${longitudeGcj02}, " + "longitudeGcj02=#{longitudeGcj02}, " +
"latitudeGcj02=${latitudeGcj02}, " + "latitudeGcj02=#{latitudeGcj02}, " +
"longitudeWgs84=${longitudeWgs84}, " + "longitudeWgs84=#{longitudeWgs84}, " +
"latitudeWgs84=${latitudeWgs84}, " + "latitudeWgs84=#{latitudeWgs84}, " +
"gpsTime='${gpsTime}' " + "gpsTime=#{gpsTime} " +
"WHERE deviceId=#{deviceId} " + "WHERE deviceId=#{deviceId} " +
" <if test='channelId != null' > AND channelId=#{channelId}</if>" + " <if test='channelId != null' > AND channelId=#{channelId}</if>" +
" </script>"}) " </script>"})
@ -315,10 +315,10 @@ public interface DeviceChannelMapper {
"select * " + "select * " +
"from device_channel " + "from device_channel " +
"where deviceId=#{deviceId}" + "where deviceId=#{deviceId}" +
" <if test='parentId != null and length != null' > and parentId = #{parentId} or left(channelId, ${parentId.length()}) = #{parentId} and length(channelId)=${length} </if>" + " <if test='parentId != null and length != null' > and parentId = #{parentId} or left(channelId, #{parentId.length()}) = #{parentId} and length(channelId)=#{length} </if>" +
" <if test='parentId == null and length != null' > and parentId = #{parentId} or length(channelId)=${length} </if>" + " <if test='parentId == null and length != null' > and parentId = #{parentId} or length(channelId)=#{length} </if>" +
" <if test='parentId == null and length == null' > and parentId = #{parentId} </if>" + " <if test='parentId == null and length == null' > and parentId = #{parentId} </if>" +
" <if test='parentId != null and length == null' > and parentId = #{parentId} or left(channelId, ${parentId.length()}) = #{parentId} </if>" + " <if test='parentId != null and length == null' > and parentId = #{parentId} or left(channelId, #{parentId.length()}) = #{parentId} </if>" +
" </script>"}) " </script>"})
List<DeviceChannel> getChannelsWithCivilCodeAndLength(String deviceId, String parentId, Integer length); List<DeviceChannel> getChannelsWithCivilCodeAndLength(String deviceId, String parentId, Integer length);

View File

@ -106,22 +106,22 @@ public interface DeviceMapper {
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE device " + "UPDATE device " +
"SET updateTime='${updateTime}'" + "SET updateTime=#{updateTime}" +
"<if test=\"name != null\">, name='${name}'</if>" + "<if test=\"name != null\">, name=#{name}</if>" +
"<if test=\"manufacturer != null\">, manufacturer='${manufacturer}'</if>" + "<if test=\"manufacturer != null\">, manufacturer=#{manufacturer}</if>" +
"<if test=\"model != null\">, model='${model}'</if>" + "<if test=\"model != null\">, model=#{model}</if>" +
"<if test=\"firmware != null\">, firmware='${firmware}'</if>" + "<if test=\"firmware != null\">, firmware=#{firmware}</if>" +
"<if test=\"transport != null\">, transport='${transport}'</if>" + "<if test=\"transport != null\">, transport=#{transport}</if>" +
"<if test=\"ip != null\">, ip='${ip}'</if>" + "<if test=\"ip != null\">, ip=#{ip}</if>" +
"<if test=\"localIp != null\">, localIp='${localIp}'</if>" + "<if test=\"localIp != null\">, localIp=#{localIp}</if>" +
"<if test=\"port != null\">, port=${port}</if>" + "<if test=\"port != null\">, port=#{port}</if>" +
"<if test=\"hostAddress != null\">, hostAddress='${hostAddress}'</if>" + "<if test=\"hostAddress != null\">, hostAddress=#{hostAddress}</if>" +
"<if test=\"online != null\">, online=${online}</if>" + "<if test=\"online != null\">, online=#{online}</if>" +
"<if test=\"registerTime != null\">, registerTime='${registerTime}'</if>" + "<if test=\"registerTime != null\">, registerTime=#{registerTime}</if>" +
"<if test=\"keepaliveTime != null\">, keepaliveTime='${keepaliveTime}'</if>" + "<if test=\"keepaliveTime != null\">, keepaliveTime=#{keepaliveTime}</if>" +
"<if test=\"keepaliveIntervalTime != null\">, keepaliveIntervalTime='${keepaliveIntervalTime}'</if>" + "<if test=\"keepaliveIntervalTime != null\">, keepaliveIntervalTime=#{keepaliveIntervalTime}</if>" +
"<if test=\"expires != null\">, expires=${expires}</if>" + "<if test=\"expires != null\">, expires=#{expires}</if>" +
"WHERE deviceId='${deviceId}'"+ "WHERE deviceId=#{deviceId}"+
" </script>"}) " </script>"})
int update(Device device); int update(Device device);
@ -225,28 +225,28 @@ public interface DeviceMapper {
"geoCoordSys," + "geoCoordSys," +
"treeType," + "treeType," +
"online" + "online" +
" FROM device WHERE ip = #{host} AND port=${port}") " FROM device WHERE ip = #{host} AND port=#{port}")
Device getDeviceByHostAndPort(String host, int port); Device getDeviceByHostAndPort(String host, int port);
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE device " + "UPDATE device " +
"SET updateTime='${updateTime}'" + "SET updateTime=#{updateTime}" +
"<if test=\"name != null\">, custom_name='${name}'</if>" + "<if test=\"name != null\">, custom_name=#{name}</if>" +
"<if test=\"password != null\">, password='${password}'</if>" + "<if test=\"password != null\">, password=#{password}</if>" +
"<if test=\"streamMode != null\">, streamMode='${streamMode}'</if>" + "<if test=\"streamMode != null\">, streamMode=#{streamMode}</if>" +
"<if test=\"ip != null\">, ip='${ip}'</if>" + "<if test=\"ip != null\">, ip=#{ip}</if>" +
"<if test=\"sdpIp != null\">, sdpIp='${sdpIp}'</if>" + "<if test=\"sdpIp != null\">, sdpIp=#{sdpIp}</if>" +
"<if test=\"port != null\">, port=${port}</if>" + "<if test=\"port != null\">, port=#{port}</if>" +
"<if test=\"charset != null\">, charset='${charset}'</if>" + "<if test=\"charset != null\">, charset=#{charset}</if>" +
"<if test=\"subscribeCycleForCatalog != null\">, subscribeCycleForCatalog=${subscribeCycleForCatalog}</if>" + "<if test=\"subscribeCycleForCatalog != null\">, subscribeCycleForCatalog=#{subscribeCycleForCatalog}</if>" +
"<if test=\"subscribeCycleForMobilePosition != null\">, subscribeCycleForMobilePosition=${subscribeCycleForMobilePosition}</if>" + "<if test=\"subscribeCycleForMobilePosition != null\">, subscribeCycleForMobilePosition=#{subscribeCycleForMobilePosition}</if>" +
"<if test=\"mobilePositionSubmissionInterval != null\">, mobilePositionSubmissionInterval=${mobilePositionSubmissionInterval}</if>" + "<if test=\"mobilePositionSubmissionInterval != null\">, mobilePositionSubmissionInterval=#{mobilePositionSubmissionInterval}</if>" +
"<if test=\"subscribeCycleForAlarm != null\">, subscribeCycleForAlarm=${subscribeCycleForAlarm}</if>" + "<if test=\"subscribeCycleForAlarm != null\">, subscribeCycleForAlarm=#{subscribeCycleForAlarm}</if>" +
"<if test=\"ssrcCheck != null\">, ssrcCheck=${ssrcCheck}</if>" + "<if test=\"ssrcCheck != null\">, ssrcCheck=#{ssrcCheck}</if>" +
"<if test=\"geoCoordSys != null\">, geoCoordSys=#{geoCoordSys}</if>" + "<if test=\"geoCoordSys != null\">, geoCoordSys=#{geoCoordSys}</if>" +
"<if test=\"treeType != null\">, treeType=#{treeType}</if>" + "<if test=\"treeType != null\">, treeType=#{treeType}</if>" +
"<if test=\"mediaServerId != null\">, mediaServerId=#{mediaServerId}</if>" + "<if test=\"mediaServerId != null\">, mediaServerId=#{mediaServerId}</if>" +
"WHERE deviceId='${deviceId}'"+ "WHERE deviceId=#{deviceId}"+
" </script>"}) " </script>"})
int updateCustom(Device device); int updateCustom(Device device);

View File

@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.*;
public interface DeviceMobilePositionMapper { public interface DeviceMobilePositionMapper {
@Insert("INSERT INTO device_mobile_position (deviceId,channelId, deviceName, time, longitude, latitude, altitude, speed, direction, reportSource, longitudeGcj02, latitudeGcj02, longitudeWgs84, latitudeWgs84, createTime) " + @Insert("INSERT INTO device_mobile_position (deviceId,channelId, deviceName, time, longitude, latitude, altitude, speed, direction, reportSource, longitudeGcj02, latitudeGcj02, longitudeWgs84, latitudeWgs84, createTime) " +
"VALUES ('${deviceId}','${channelId}', '${deviceName}', '${time}', ${longitude}, ${latitude}, ${altitude}, ${speed}, ${direction}, '${reportSource}', ${longitudeGcj02}, ${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84}, '${createTime}')") "VALUES (#{deviceId},#{channelId}, #{deviceName}, #{time}, #{longitude}, #{latitude}, #{altitude}, #{speed}, #{direction}, #{reportSource}, #{longitudeGcj02}, #{latitudeGcj02}, #{longitudeWgs84}, #{latitudeWgs84}, #{createTime})")
int insertNewPosition(MobilePosition mobilePosition); int insertNewPosition(MobilePosition mobilePosition);
@Select(value = {" <script>" + @Select(value = {" <script>" +

View File

@ -16,9 +16,9 @@ public interface GbStreamMapper {
@Insert("REPLACE INTO gb_stream (app, stream, gbId, name, " + @Insert("REPLACE INTO gb_stream (app, stream, gbId, name, " +
"longitude, latitude, streamType, mediaServerId, createTime) VALUES" + "longitude, latitude, streamType, mediaServerId, createTime) VALUES" +
"('${app}', '${stream}', '${gbId}', '${name}', " + "(#{app}, #{stream}, #{gbId}, #{name}, " +
"'${longitude}', '${latitude}', '${streamType}', " + "#{longitude}, #{latitude}, #{streamType}, " +
"'${mediaServerId}', '${createTime}')") "#{mediaServerId}, #{createTime})")
@Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId") @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId")
int add(GbStream gbStream); int add(GbStream gbStream);
@ -57,7 +57,7 @@ public interface GbStreamMapper {
"(select pgs.gbStreamId from platform_gb_stream pgs where pgs.platformId = #{platformId} and pgs.catalogId=#{catalogId})</if> " + "(select pgs.gbStreamId from platform_gb_stream pgs where pgs.platformId = #{platformId} and pgs.catalogId=#{catalogId})</if> " +
" <if test='catalogId == null'> AND gs.gbStreamId not in" + " <if test='catalogId == null'> AND gs.gbStreamId not in" +
"(select pgs.gbStreamId from platform_gb_stream pgs where pgs.platformId = #{platformId}) </if> " + "(select pgs.gbStreamId from platform_gb_stream pgs where pgs.platformId = #{platformId}) </if> " +
" <if test='query != null'> AND (gs.app LIKE '%${query}%' OR gs.stream LIKE '%${query}%' OR gs.gbId LIKE '%${query}%' OR gs.name LIKE '%${query}%')</if> " + " <if test='query != null'> AND (gs.app LIKE concat('%',#{query},'%') OR gs.stream LIKE concat('%',#{query},'%') OR gs.gbId LIKE concat('%',#{query},'%') OR gs.name LIKE concat('%',#{query},'%'))</if> " +
" <if test='mediaServerId != null' > AND gs.mediaServerId=#{mediaServerId} </if>" + " <if test='mediaServerId != null' > AND gs.mediaServerId=#{mediaServerId} </if>" +
" order by gs.gbStreamId asc " + " order by gs.gbStreamId asc " +
"</script>") "</script>")
@ -71,7 +71,7 @@ public interface GbStreamMapper {
@Select("SELECT gs.*, pgs.platformId as platformId, pgs.catalogId as catalogId FROM gb_stream gs " + @Select("SELECT gs.*, pgs.platformId as platformId, pgs.catalogId as catalogId FROM gb_stream gs " +
"LEFT JOIN platform_gb_stream pgs ON gs.gbStreamId = pgs.gbStreamId " + "LEFT JOIN platform_gb_stream pgs ON gs.gbStreamId = pgs.gbStreamId " +
"WHERE gs.gbId = '${gbId}' AND pgs.platformId = '${platformId}'") "WHERE gs.gbId = #{gbId} AND pgs.platformId = #{platformId}")
GbStream queryStreamInPlatform(String platformId, String gbId); GbStream queryStreamInPlatform(String platformId, String gbId);
@Select("<script> "+ @Select("<script> "+
@ -122,9 +122,9 @@ public interface GbStreamMapper {
"longitude, latitude, streamType, mediaServerId, createTime)" + "longitude, latitude, streamType, mediaServerId, createTime)" +
"values " + "values " +
"<foreach collection='subList' index='index' item='item' separator=','> " + "<foreach collection='subList' index='index' item='item' separator=','> " +
"('${item.app}', '${item.stream}', '${item.gbId}', '${item.name}', " + "(#{item.app}, #{item.stream}, #{item.gbId}, #{item.name}, " +
"'${item.longitude}', '${item.latitude}', '${item.streamType}', " + "#{item.longitude}, #{item.latitude}, #{item.streamType}, " +
"'${item.mediaServerId}', '${item.createTime}') "+ "#{item.mediaServerId}, #{item.createTime}) "+
"</foreach> " + "</foreach> " +
"</script>") "</script>")
@Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId") @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId")
@ -134,7 +134,7 @@ public interface GbStreamMapper {
"<foreach collection='gpsMsgInfos' item='item' separator=';'>" + "<foreach collection='gpsMsgInfos' item='item' separator=';'>" +
" UPDATE" + " UPDATE" +
" gb_stream" + " gb_stream" +
" SET longitude=${item.lng}, latitude=${item.lat} " + " SET longitude=#{item.lng}, latitude=#{item.lat} " +
"WHERE gbId=#{item.id}"+ "WHERE gbId=#{item.id}"+
"</foreach>" + "</foreach>" +
"</script>"}) "</script>"})

View File

@ -18,16 +18,16 @@ import java.util.List;
public interface LogMapper { public interface LogMapper {
@Insert("insert into log ( name, type, uri, address, result, timing, username, createTime) " + @Insert("insert into log ( name, type, uri, address, result, timing, username, createTime) " +
"values ('${name}', '${type}', '${uri}', '${address}', '${result}', ${timing}, '${username}', '${createTime}')") "values (#{name}, #{type}, #{uri}, #{address}, #{result}, #{timing}, #{username}, #{createTime})")
int add(LogDto logDto); int add(LogDto logDto);
@Select(value = {"<script>" + @Select(value = {"<script>" +
" SELECT * FROM log " + " SELECT * FROM log " +
" WHERE 1=1 " + " WHERE 1=1 " +
" <if test=\"query != null\"> AND (name LIKE '%${query}%')</if> " + " <if test=\"query != null\"> AND (name LIKE concat('%',#{query},'%'))</if> " +
" <if test=\"type != null\" > AND type = '${type}'</if>" + " <if test=\"type != null\" > AND type = #{type}</if>" +
" <if test=\"startTime != null\" > AND createTime &gt;= '${startTime}' </if>" + " <if test=\"startTime != null\" > AND createTime &gt;= #{startTime} </if>" +
" <if test=\"endTime != null\" > AND createTime &lt;= '${endTime}' </if>" + " <if test=\"endTime != null\" > AND createTime &lt;= #{endTime} </if>" +
" ORDER BY createTime DESC " + " ORDER BY createTime DESC " +
" </script>"}) " </script>"})
List<LogDto> query(String query, String type, String startTime, String endTime); List<LogDto> query(String query, String type, String startTime, String endTime);

View File

@ -35,92 +35,92 @@ public interface MediaServerMapper {
"hookAliveInterval" + "hookAliveInterval" +
") VALUES " + ") VALUES " +
"(" + "(" +
"'${id}', " + "#{id}, " +
"'${ip}', " + "#{ip}, " +
"'${hookIp}', " + "#{hookIp}, " +
"'${sdpIp}', " + "#{sdpIp}, " +
"'${streamIp}', " + "#{streamIp}, " +
"${httpPort}, " + "#{httpPort}, " +
"${httpSSlPort}, " + "#{httpSSlPort}, " +
"${rtmpPort}, " + "#{rtmpPort}, " +
"${rtmpSSlPort}, " + "#{rtmpSSlPort}, " +
"${rtpProxyPort}, " + "#{rtpProxyPort}, " +
"${rtspPort}, " + "#{rtspPort}, " +
"${rtspSSLPort}, " + "#{rtspSSLPort}, " +
"${autoConfig}, " + "#{autoConfig}, " +
"'${secret}', " + "#{secret}, " +
"${rtpEnable}, " + "#{rtpEnable}, " +
"'${rtpPortRange}', " + "#{rtpPortRange}, " +
"${recordAssistPort}, " + "#{recordAssistPort}, " +
"${defaultServer}, " + "#{defaultServer}, " +
"'${createTime}', " + "#{createTime}, " +
"'${updateTime}', " + "#{updateTime}, " +
"${hookAliveInterval})") "#{hookAliveInterval})")
int add(MediaServerItem mediaServerItem); int add(MediaServerItem mediaServerItem);
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE media_server " + "UPDATE media_server " +
"SET updateTime='${updateTime}'" + "SET updateTime=#{updateTime}" +
"<if test=\"ip != null\">, ip='${ip}'</if>" + "<if test=\"ip != null\">, ip=#{ip}</if>" +
"<if test=\"hookIp != null\">, hookIp='${hookIp}'</if>" + "<if test=\"hookIp != null\">, hookIp=#{hookIp}</if>" +
"<if test=\"sdpIp != null\">, sdpIp='${sdpIp}'</if>" + "<if test=\"sdpIp != null\">, sdpIp=#{sdpIp}</if>" +
"<if test=\"streamIp != null\">, streamIp='${streamIp}'</if>" + "<if test=\"streamIp != null\">, streamIp=#{streamIp}</if>" +
"<if test=\"httpPort != null\">, httpPort=${httpPort}</if>" + "<if test=\"httpPort != null\">, httpPort=#{httpPort}</if>" +
"<if test=\"httpSSlPort != null\">, httpSSlPort=${httpSSlPort}</if>" + "<if test=\"httpSSlPort != null\">, httpSSlPort=#{httpSSlPort}</if>" +
"<if test=\"rtmpPort != null\">, rtmpPort=${rtmpPort}</if>" + "<if test=\"rtmpPort != null\">, rtmpPort=#{rtmpPort}</if>" +
"<if test=\"rtmpSSlPort != null\">, rtmpSSlPort=${rtmpSSlPort}</if>" + "<if test=\"rtmpSSlPort != null\">, rtmpSSlPort=#{rtmpSSlPort}</if>" +
"<if test=\"rtpProxyPort != null\">, rtpProxyPort=${rtpProxyPort}</if>" + "<if test=\"rtpProxyPort != null\">, rtpProxyPort=#{rtpProxyPort}</if>" +
"<if test=\"rtspPort != null\">, rtspPort=${rtspPort}</if>" + "<if test=\"rtspPort != null\">, rtspPort=#{rtspPort}</if>" +
"<if test=\"rtspSSLPort != null\">, rtspSSLPort=${rtspSSLPort}</if>" + "<if test=\"rtspSSLPort != null\">, rtspSSLPort=#{rtspSSLPort}</if>" +
"<if test=\"autoConfig != null\">, autoConfig=${autoConfig}</if>" + "<if test=\"autoConfig != null\">, autoConfig=#{autoConfig}</if>" +
"<if test=\"rtpEnable != null\">, rtpEnable=${rtpEnable}</if>" + "<if test=\"rtpEnable != null\">, rtpEnable=#{rtpEnable}</if>" +
"<if test=\"rtpPortRange != null\">, rtpPortRange='${rtpPortRange}'</if>" + "<if test=\"rtpPortRange != null\">, rtpPortRange=#{rtpPortRange}</if>" +
"<if test=\"secret != null\">, secret='${secret}'</if>" + "<if test=\"secret != null\">, secret=#{secret}</if>" +
"<if test=\"recordAssistPort != null\">, recordAssistPort=${recordAssistPort}</if>" + "<if test=\"recordAssistPort != null\">, recordAssistPort=#{recordAssistPort}</if>" +
"<if test=\"hookAliveInterval != null\">, hookAliveInterval=${hookAliveInterval}</if>" + "<if test=\"hookAliveInterval != null\">, hookAliveInterval=#{hookAliveInterval}</if>" +
"WHERE id='${id}'"+ "WHERE id=#{id}"+
" </script>"}) " </script>"})
int update(MediaServerItem mediaServerItem); int update(MediaServerItem mediaServerItem);
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE media_server " + "UPDATE media_server " +
"SET updateTime='${updateTime}'" + "SET updateTime=#{updateTime}" +
"<if test=\"id != null\">, id='${id}'</if>" + "<if test=\"id != null\">, id=#{id}</if>" +
"<if test=\"hookIp != null\">, hookIp='${hookIp}'</if>" + "<if test=\"hookIp != null\">, hookIp=#{hookIp}</if>" +
"<if test=\"sdpIp != null\">, sdpIp='${sdpIp}'</if>" + "<if test=\"sdpIp != null\">, sdpIp=#{sdpIp}</if>" +
"<if test=\"streamIp != null\">, streamIp='${streamIp}'</if>" + "<if test=\"streamIp != null\">, streamIp=#{streamIp}</if>" +
"<if test=\"httpSSlPort != null\">, httpSSlPort=${httpSSlPort}</if>" + "<if test=\"httpSSlPort != null\">, httpSSlPort=#{httpSSlPort}</if>" +
"<if test=\"rtmpPort != null\">, rtmpPort=${rtmpPort}</if>" + "<if test=\"rtmpPort != null\">, rtmpPort=#{rtmpPort}</if>" +
"<if test=\"rtmpSSlPort != null\">, rtmpSSlPort=${rtmpSSlPort}</if>" + "<if test=\"rtmpSSlPort != null\">, rtmpSSlPort=#{rtmpSSlPort}</if>" +
"<if test=\"rtpProxyPort != null\">, rtpProxyPort=${rtpProxyPort}</if>" + "<if test=\"rtpProxyPort != null\">, rtpProxyPort=#{rtpProxyPort}</if>" +
"<if test=\"rtspPort != null\">, rtspPort=${rtspPort}</if>" + "<if test=\"rtspPort != null\">, rtspPort=#{rtspPort}</if>" +
"<if test=\"rtspSSLPort != null\">, rtspSSLPort=${rtspSSLPort}</if>" + "<if test=\"rtspSSLPort != null\">, rtspSSLPort=#{rtspSSLPort}</if>" +
"<if test=\"autoConfig != null\">, autoConfig=${autoConfig}</if>" + "<if test=\"autoConfig != null\">, autoConfig=#{autoConfig}</if>" +
"<if test=\"rtpEnable != null\">, rtpEnable=${rtpEnable}</if>" + "<if test=\"rtpEnable != null\">, rtpEnable=#{rtpEnable}</if>" +
"<if test=\"rtpPortRange != null\">, rtpPortRange='${rtpPortRange}'</if>" + "<if test=\"rtpPortRange != null\">, rtpPortRange=#{rtpPortRange}</if>" +
"<if test=\"secret != null\">, secret='${secret}'</if>" + "<if test=\"secret != null\">, secret=#{secret}</if>" +
"<if test=\"recordAssistPort != null\">, recordAssistPort=${recordAssistPort}</if>" + "<if test=\"recordAssistPort != null\">, recordAssistPort=#{recordAssistPort}</if>" +
"<if test=\"hookAliveInterval != null\">, hookAliveInterval=${hookAliveInterval}</if>" + "<if test=\"hookAliveInterval != null\">, hookAliveInterval=#{hookAliveInterval}</if>" +
"WHERE ip='${ip}' and httpPort=${httpPort}"+ "WHERE ip=#{ip} and httpPort=#{httpPort}"+
" </script>"}) " </script>"})
int updateByHostAndPort(MediaServerItem mediaServerItem); int updateByHostAndPort(MediaServerItem mediaServerItem);
@Select("SELECT * FROM media_server WHERE id='${id}'") @Select("SELECT * FROM media_server WHERE id=#{id}")
MediaServerItem queryOne(String id); MediaServerItem queryOne(String id);
@Select("SELECT * FROM media_server") @Select("SELECT * FROM media_server")
List<MediaServerItem> queryAll(); List<MediaServerItem> queryAll();
@Delete("DELETE FROM media_server WHERE id='${id}'") @Delete("DELETE FROM media_server WHERE id=#{id}")
void delOne(String id); void delOne(String id);
@Select("DELETE FROM media_server WHERE ip='${host}' and httpPort=${port}") @Select("DELETE FROM media_server WHERE ip=#{host} and httpPort=#{port}")
void delOneByIPAndPort(String host, int port); void delOneByIPAndPort(String host, int port);
@Delete("DELETE FROM media_server WHERE defaultServer=1") @Delete("DELETE FROM media_server WHERE defaultServer=1")
int delDefault(); int delDefault();
@Select("SELECT * FROM media_server WHERE ip='${host}' and httpPort=${port}") @Select("SELECT * FROM media_server WHERE ip=#{host} and httpPort=#{port}")
MediaServerItem queryOneByHostAndPort(String host, int port); MediaServerItem queryOneByHostAndPort(String host, int port);
@Select("SELECT * FROM media_server WHERE defaultServer=1") @Select("SELECT * FROM media_server WHERE defaultServer=1")

View File

@ -17,9 +17,9 @@ public interface ParentPlatformMapper {
@Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp, " + @Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp, " +
" devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, " + " devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, " +
" status, startOfflinePush, catalogId, administrativeDivision, catalogGroup, createTime, updateTime, treeType) " + " status, startOfflinePush, catalogId, administrativeDivision, catalogGroup, createTime, updateTime, treeType) " +
" VALUES (${enable}, '${name}', '${serverGBId}', '${serverGBDomain}', '${serverIP}', ${serverPort}, '${deviceGBId}', '${deviceIp}', " + " VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " +
" '${devicePort}', '${username}', '${password}', '${expires}', '${keepTimeout}', '${transport}', '${characterSet}', ${ptz}, ${rtcp}, " + " #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, #{rtcp}, " +
" ${status}, ${startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime}, #{treeType})") " #{status}, #{startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime}, #{treeType})")
int addParentPlatform(ParentPlatform parentPlatform); int addParentPlatform(ParentPlatform parentPlatform);
@Update("UPDATE parent_platform " + @Update("UPDATE parent_platform " +
@ -41,7 +41,7 @@ public interface ParentPlatformMapper {
"ptz=#{ptz}, " + "ptz=#{ptz}, " +
"rtcp=#{rtcp}, " + "rtcp=#{rtcp}, " +
"status=#{status}, " + "status=#{status}, " +
"startOfflinePush=${startOfflinePush}, " + "startOfflinePush=#{startOfflinePush}, " +
"catalogGroup=#{catalogGroup}, " + "catalogGroup=#{catalogGroup}, " +
"administrativeDivision=#{administrativeDivision}, " + "administrativeDivision=#{administrativeDivision}, " +
"createTime=#{createTime}, " + "createTime=#{createTime}, " +

View File

@ -21,22 +21,22 @@ public interface PlatformChannelMapper {
* 查询列表里已经关联的 * 查询列表里已经关联的
*/ */
@Select("<script> "+ @Select("<script> "+
"SELECT deviceChannelId FROM platform_gb_channel WHERE platformId='${platformId}' AND deviceChannelId in" + "SELECT deviceChannelId FROM platform_gb_channel WHERE platformId=#{platformId} AND deviceChannelId in" +
"<foreach collection='channelReduces' open='(' item='item' separator=',' close=')'> '${item.id}'</foreach>" + "<foreach collection='channelReduces' open='(' item='item' separator=',' close=')'> #{item.id}</foreach>" +
"</script>") "</script>")
List<Integer> findChannelRelatedPlatform(String platformId, List<ChannelReduce> channelReduces); List<Integer> findChannelRelatedPlatform(String platformId, List<ChannelReduce> channelReduces);
@Insert("<script> "+ @Insert("<script> "+
"INSERT INTO platform_gb_channel (platformId, deviceChannelId, catalogId) VALUES" + "INSERT INTO platform_gb_channel (platformId, deviceChannelId, catalogId) VALUES" +
"<foreach collection='channelReducesToAdd' item='item' separator=','>" + "<foreach collection='channelReducesToAdd' item='item' separator=','>" +
" ('${platformId}', '${item.id}' , '${item.catalogId}' )" + " (#{platformId}, #{item.id} , #{item.catalogId} )" +
"</foreach>" + "</foreach>" +
"</script>") "</script>")
int addChannels(String platformId, List<ChannelReduce> channelReducesToAdd); int addChannels(String platformId, List<ChannelReduce> channelReducesToAdd);
@Delete("<script> "+ @Delete("<script> "+
"DELETE FROM platform_gb_channel WHERE platformId='${platformId}' AND deviceChannelId in" + "DELETE FROM platform_gb_channel WHERE platformId=#{platformId} AND deviceChannelId in" +
"<foreach collection='channelReducesToDel' item='item' open='(' separator=',' close=')' > '${item.id}'</foreach>" + "<foreach collection='channelReducesToDel' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" +
"</script>") "</script>")
int delChannelForGB(String platformId, List<ChannelReduce> channelReducesToDel); int delChannelForGB(String platformId, List<ChannelReduce> channelReducesToDel);
@ -50,14 +50,14 @@ public interface PlatformChannelMapper {
int delChannelForDeviceId(String deviceId); int delChannelForDeviceId(String deviceId);
@Delete("<script> "+ @Delete("<script> "+
"DELETE FROM platform_gb_channel WHERE platformId='${platformId}'" + "DELETE FROM platform_gb_channel WHERE platformId=#{platformId}" +
"</script>") "</script>")
int cleanChannelForGB(String platformId); int cleanChannelForGB(String platformId);
@Select("SELECT dc.* FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE dc.channelId='${channelId}' and pgc.platformId='${platformId}'") @Select("SELECT dc.* FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE dc.channelId=#{channelId} and pgc.platformId=#{platformId}")
List<DeviceChannel> queryChannelInParentPlatform(String platformId, String channelId); List<DeviceChannel> queryChannelInParentPlatform(String platformId, String channelId);
@Select("SELECT dc.* FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE pgc.platformId='${platformId}' and pgc.catalogId=#{catalogId}") @Select("SELECT dc.* FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE pgc.platformId=#{platformId} and pgc.catalogId=#{catalogId}")
List<DeviceChannel> queryAllChannelInCatalog(String platformId, String catalogId); List<DeviceChannel> queryAllChannelInCatalog(String platformId, String catalogId);
@Select(" select dc.channelId as id, dc.name as name, pgc.platformId as platformId, pgc.catalogId as parentId, 0 as childrenCount, 1 as type " + @Select(" select dc.channelId as id, dc.name as name, pgc.platformId as platformId, pgc.catalogId as parentId, 0 as childrenCount, 1 as type " +

View File

@ -26,7 +26,7 @@ public interface PlatformGbStreamMapper {
"(gbStreamId, platformId, catalogId) " + "(gbStreamId, platformId, catalogId) " +
"values " + "values " +
"<foreach collection='streamPushItems' index='index' item='item' separator=','> " + "<foreach collection='streamPushItems' index='index' item='item' separator=','> " +
"(${item.gbStreamId}, '${item.platformId}', '${item.catalogId}')" + "(#{item.gbStreamId}, #{item.platformId}, #{item.catalogId})" +
"</foreach> " + "</foreach> " +
"</script>") "</script>")
int batchAdd(List<StreamPushItem> streamPushItems); int batchAdd(List<StreamPushItem> streamPushItems);

View File

@ -14,10 +14,10 @@ import java.util.List;
public interface RecordInfoDao { public interface RecordInfoDao {
@Insert("INSERT INTO recordInfo (app, stream, mediaServerId, createTime, type, deviceId, channelId, name) VALUES" + @Insert("INSERT INTO recordInfo (app, stream, mediaServerId, createTime, type, deviceId, channelId, name) VALUES" +
"('${app}', '${stream}', '${mediaServerId}', datetime('now','localtime')), '${type}', '${deviceId}', '${channelId}', '${name}'") "(#{app}, #{stream}, #{mediaServerId}, datetime('now','localtime')), #{type}, #{deviceId}, #{channelId}, #{name}")
int add(RecordInfo recordInfo); int add(RecordInfo recordInfo);
@Delete("DELETE FROM user WHERE createTime < '${beforeTime}'") @Delete("DELETE FROM user WHERE createTime < #{beforeTime}")
int deleteBefore(String beforeTime); int deleteBefore(String beforeTime);
@Select("select * FROM recordInfo") @Select("select * FROM recordInfo")

View File

@ -12,14 +12,14 @@ import java.util.List;
public interface RoleMapper { public interface RoleMapper {
@Insert("INSERT INTO user_role (name, authority, createTime, updateTime) VALUES" + @Insert("INSERT INTO user_role (name, authority, createTime, updateTime) VALUES" +
"('${name}', '${authority}', '${createTime}', '${updateTime}')") "(#{name}, #{authority}, #{createTime}, #{updateTime})")
int add(Role role); int add(Role role);
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE user_role " + "UPDATE user_role " +
"SET updateTime='${updateTime}' " + "SET updateTime=#{updateTime} " +
"<if test=\"name != null\">, name='${name}'</if>" + "<if test=\"name != null\">, name=#{name}</if>" +
"<if test=\"authority != null\">, authority='${authority}'</if>" + "<if test=\"authority != null\">, authority=#{authority}</if>" +
"WHERE id != 1 and id=#{id}" + "WHERE id != 1 and id=#{id}" +
" </script>"}) " </script>"})
int update(Role role); int update(Role role);

View File

@ -13,9 +13,9 @@ public interface StreamProxyMapper {
@Insert("INSERT INTO stream_proxy (type, name, app, stream,mediaServerId, url, src_url, dst_url, " + @Insert("INSERT INTO stream_proxy (type, name, app, stream,mediaServerId, url, src_url, dst_url, " +
"timeout_ms, ffmpeg_cmd_key, rtp_type, enable_audio, enable_mp4, enable, status, enable_remove_none_reader, enable_disable_none_reader, createTime) VALUES" + "timeout_ms, ffmpeg_cmd_key, rtp_type, enable_audio, enable_mp4, enable, status, enable_remove_none_reader, enable_disable_none_reader, createTime) VALUES" +
"('${type}','${name}', '${app}', '${stream}', '${mediaServerId}','${url}', '${src_url}', '${dst_url}', " + "(#{type}, #{name}, #{app}, #{stream}, #{mediaServerId}, #{url}, #{src_url}, #{dst_url}, " +
"'${timeout_ms}', '${ffmpeg_cmd_key}', '${rtp_type}', ${enable_audio}, ${enable_mp4}, ${enable}, ${status}, " + "#{timeout_ms}, #{ffmpeg_cmd_key}, #{rtp_type}, #{enable_audio}, #{enable_mp4}, #{enable}, #{status}, " +
"${enable_remove_none_reader}, ${enable_disable_none_reader}, '${createTime}' )") "#{enable_remove_none_reader}, #{enable_disable_none_reader}, #{createTime} )")
int add(StreamProxyItem streamProxyDto); int add(StreamProxyItem streamProxyDto);
@Update("UPDATE stream_proxy " + @Update("UPDATE stream_proxy " +
@ -45,7 +45,7 @@ public interface StreamProxyMapper {
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream order by st.createTime desc") @Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream order by st.createTime desc")
List<StreamProxyItem> selectAll(); List<StreamProxyItem> selectAll();
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.enable=${enable} order by st.createTime desc") @Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.enable=#{enable} order by st.createTime desc")
List<StreamProxyItem> selectForEnable(boolean enable); List<StreamProxyItem> selectForEnable(boolean enable);
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.app=#{app} AND st.stream=#{stream} order by st.createTime desc") @Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream WHERE st.app=#{app} AND st.stream=#{stream} order by st.createTime desc")
@ -53,12 +53,12 @@ public interface StreamProxyMapper {
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " + @Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " +
"LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + "LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " +
"WHERE st.enable=${enable} and st.mediaServerId = #{id} order by st.createTime desc") "WHERE st.enable=#{enable} and st.mediaServerId = #{id} order by st.createTime desc")
List<StreamProxyItem> selectForEnableInMediaServer(String id, boolean enable); List<StreamProxyItem> selectForEnableInMediaServer(String id, boolean enable);
@Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " + @Select("SELECT st.*, pgs.gbId, pgs.name, pgs.longitude, pgs.latitude FROM stream_proxy st " +
"LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " + "LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream " +
"WHERE st.mediaServerId = '${id}' order by st.createTime desc") "WHERE st.mediaServerId = #{id} order by st.createTime desc")
List<StreamProxyItem> selectInMediaServer(String id); List<StreamProxyItem> selectInMediaServer(String id);
@Update("UPDATE stream_proxy " + @Update("UPDATE stream_proxy " +
@ -67,7 +67,7 @@ public interface StreamProxyMapper {
void updateStatusByMediaServerId(String mediaServerId, boolean status); void updateStatusByMediaServerId(String mediaServerId, boolean status);
@Update("UPDATE stream_proxy " + @Update("UPDATE stream_proxy " +
"SET status=${status} " + "SET status=#{status} " +
"WHERE app=#{app} AND stream=#{stream}") "WHERE app=#{app} AND stream=#{stream}")
int updateStatus(String app, String stream, boolean status); int updateStatus(String app, String stream, boolean status);

View File

@ -17,23 +17,23 @@ public interface StreamPushMapper {
@Insert("INSERT INTO stream_push (app, stream, totalReaderCount, originType, originTypeStr, " + @Insert("INSERT INTO stream_push (app, stream, totalReaderCount, originType, originTypeStr, " +
"pushTime, aliveSecond, mediaServerId, serverId, updateTime, createTime, pushIng, self) VALUES" + "pushTime, aliveSecond, mediaServerId, serverId, updateTime, createTime, pushIng, self) VALUES" +
"('${app}', '${stream}', '${totalReaderCount}', '${originType}', '${originTypeStr}', " + "(#{app}, #{stream}, #{totalReaderCount}, #{originType}, #{originTypeStr}, " +
"'${pushTime}', '${aliveSecond}', '${mediaServerId}' , '${serverId}' , '${updateTime}' , '${createTime}', " + "#{pushTime}, #{aliveSecond}, #{mediaServerId} , #{serverId} , #{updateTime} , #{createTime}, " +
"${pushIng}, ${self} )") "#{pushIng}, #{self} )")
int add(StreamPushItem streamPushItem); int add(StreamPushItem streamPushItem);
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE stream_push " + "UPDATE stream_push " +
"SET updateTime='${updateTime}'" + "SET updateTime=#{updateTime}" +
"<if test=\"mediaServerId != null\">, mediaServerId='${mediaServerId}'</if>" + "<if test=\"mediaServerId != null\">, mediaServerId=#{mediaServerId}</if>" +
"<if test=\"totalReaderCount != null\">, totalReaderCount='${totalReaderCount}'</if>" + "<if test=\"totalReaderCount != null\">, totalReaderCount=#{totalReaderCount}</if>" +
"<if test=\"originType != null\">, originType=${originType}</if>" + "<if test=\"originType != null\">, originType=#{originType}</if>" +
"<if test=\"originTypeStr != null\">, originTypeStr='${originTypeStr}'</if>" + "<if test=\"originTypeStr != null\">, originTypeStr=#{originTypeStr}</if>" +
"<if test=\"pushTime != null\">, pushTime='${pushTime}'</if>" + "<if test=\"pushTime != null\">, pushTime=#{pushTime}</if>" +
"<if test=\"aliveSecond != null\">, aliveSecond='${aliveSecond}'</if>" + "<if test=\"aliveSecond != null\">, aliveSecond=#{aliveSecond}</if>" +
"<if test=\"pushIng != null\">, pushIng=${pushIng}</if>" + "<if test=\"pushIng != null\">, pushIng=#{pushIng}</if>" +
"<if test=\"self != null\">, self=${self}</if>" + "<if test=\"self != null\">, self=#{self}</if>" +
"WHERE app=#{app} AND stream=#{stream}"+ "WHERE app=#{app} AND stream=#{stream}"+
" </script>"}) " </script>"})
int update(StreamPushItem streamPushItem); int update(StreamPushItem streamPushItem);
@ -76,7 +76,7 @@ public interface StreamPushMapper {
"on st.app = gs.app AND st.stream = gs.stream " + "on st.app = gs.app AND st.stream = gs.stream " +
"WHERE " + "WHERE " +
"1=1 " + "1=1 " +
" <if test='query != null'> AND (st.app LIKE '%${query}%' OR st.stream LIKE '%${query}%' OR gs.gbId LIKE '%${query}%' OR gs.name LIKE '%${query}%')</if> " + " <if test='query != null'> AND (st.app LIKE concat('%',#{query},'%') OR st.stream LIKE concat('%',#{query},'%') OR gs.gbId LIKE concat('%',#{query},'%') OR gs.name LIKE concat('%',#{query},'%'))</if> " +
" <if test='pushing == true' > AND (gs.gbId is null OR st.pushIng=1)</if>" + " <if test='pushing == true' > AND (gs.gbId is null OR st.pushIng=1)</if>" +
" <if test='pushing == false' > AND (st.pushIng is null OR st.pushIng=0) </if>" + " <if test='pushing == false' > AND (st.pushIng is null OR st.pushIng=0) </if>" +
" <if test='mediaServerId != null' > AND st.mediaServerId=#{mediaServerId} </if>" + " <if test='mediaServerId != null' > AND st.mediaServerId=#{mediaServerId} </if>" +
@ -94,9 +94,9 @@ public interface StreamPushMapper {
"Insert IGNORE INTO stream_push (app, stream, totalReaderCount, originType, originTypeStr, " + "Insert IGNORE INTO stream_push (app, stream, totalReaderCount, originType, originTypeStr, " +
"createTime, aliveSecond, mediaServerId, status, pushIng) " + "createTime, aliveSecond, mediaServerId, status, pushIng) " +
"VALUES <foreach collection='streamPushItems' item='item' index='index' separator=','>" + "VALUES <foreach collection='streamPushItems' item='item' index='index' separator=','>" +
"( '${item.app}', '${item.stream}', '${item.totalReaderCount}', #{item.originType}, " + "( #{item.app}, #{item.stream}, #{item.totalReaderCount}, #{item.originType}, " +
"'${item.originTypeStr}',#{item.createTime}, #{item.aliveSecond}, '${item.mediaServerId}', ${item.status} ," + "#{item.originTypeStr},#{item.createTime}, #{item.aliveSecond}, #{item.mediaServerId}, #{item.status} ," +
" ${item.pushIng} )" + " #{item.pushIng} )" +
" </foreach>" + " </foreach>" +
"</script>") "</script>")
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
@ -115,12 +115,12 @@ public interface StreamPushMapper {
List<StreamPushItem> selectAllByMediaServerIdWithOutGbID(String mediaServerId); List<StreamPushItem> selectAllByMediaServerIdWithOutGbID(String mediaServerId);
@Update("UPDATE stream_push " + @Update("UPDATE stream_push " +
"SET status=${status} " + "SET status=#{status} " +
"WHERE app=#{app} AND stream=#{stream}") "WHERE app=#{app} AND stream=#{stream}")
int updateStatus(String app, String stream, boolean status); int updateStatus(String app, String stream, boolean status);
@Update("UPDATE stream_push " + @Update("UPDATE stream_push " +
"SET pushIng=${pushIng} " + "SET pushIng=#{pushIng} " +
"WHERE app=#{app} AND stream=#{stream}") "WHERE app=#{app} AND stream=#{stream}")
int updatePushStatus(String app, String stream, boolean pushIng); int updatePushStatus(String app, String stream, boolean pushIng);

View File

@ -11,16 +11,16 @@ import java.util.List;
public interface UserMapper { public interface UserMapper {
@Insert("INSERT INTO user (username, password, roleId, pushKey, createTime, updateTime) VALUES" + @Insert("INSERT INTO user (username, password, roleId, pushKey, createTime, updateTime) VALUES" +
"('${username}', '${password}', '${role.id}', '${pushKey}', '${createTime}', '${updateTime}')") "(#{username}, #{password}, #{role.id}, #{pushKey}, #{createTime}, #{updateTime})")
int add(User user); int add(User user);
@Update(value = {" <script>" + @Update(value = {" <script>" +
"UPDATE user " + "UPDATE user " +
"SET updateTime='${updateTime}' " + "SET updateTime=#{updateTime} " +
"<if test=\"pushKey != null\">, pushKey='${pushKey}'</if>" + "<if test=\"pushKey != null\">, pushKey=#{pushKey}</if>" +
"<if test=\"role != null\">, roleId='${role.id}'</if>" + "<if test=\"role != null\">, roleId=#{role.id}</if>" +
"<if test=\"password != null\">, password='${password}'</if>" + "<if test=\"password != null\">, password=#{password}</if>" +
"<if test=\"username != null\">, username='${username}'</if>" + "<if test=\"username != null\">, username=#{username}</if>" +
"WHERE id=#{id}" + "WHERE id=#{id}" +
" </script>"}) " </script>"})
int update(User user); int update(User user);
@ -50,10 +50,10 @@ public interface UserMapper {
@ResultMap(value="roleMap") @ResultMap(value="roleMap")
List<User> selectAll(); List<User> selectAll();
@Select("select * from (select user.*, concat('${callId}_', pushKey) as str1 from user) as u where md5(u.str1) = '${sign}'") @Select("select * from (select user.*, concat(#{callId}_', pushKey) as str1 from user) as u where md5(u.str1) = #{sign}")
List<User> checkPushAuthorityByCallIdAndSign(String callId, String sign); List<User> checkPushAuthorityByCallIdAndSign(String callId, String sign);
@Select("select * from user where md5(pushKey) = '${sign}'") @Select("select * from user where md5(pushKey) = #{sign}")
List<User> checkPushAuthorityByCallId(String sign); List<User> checkPushAuthorityByCallId(String sign);
@Select("select u.id, u.username,u.pushKey,u.roleId, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u join user_role r on u.roleId=r.id") @Select("select u.id, u.username,u.pushKey,u.roleId, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u join user_role r on u.roleId=r.id")