|  | @@ -19,11 +19,11 @@ public interface DeviceChannelMapper {
 | 
	
		
			
				|  |  |      @Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " +
 | 
	
		
			
				|  |  |              "address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " +
 | 
	
		
			
				|  |  |              "ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " +
 | 
	
		
			
				|  |  | -            "longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId) " +
 | 
	
		
			
				|  |  | +            "longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId, gpsTime) " +
 | 
	
		
			
				|  |  |              "VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," +
 | 
	
		
			
				|  |  |              "'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " +
 | 
	
		
			
				|  |  |              "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude}, ${longitudeGcj02}, " +
 | 
	
		
			
				|  |  | -            "${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84},'${createTime}', '${updateTime}', '${businessGroupId}')")
 | 
	
		
			
				|  |  | +            "${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84},'${createTime}', '${updateTime}', '${businessGroupId}', '${gpsTime}')")
 | 
	
		
			
				|  |  |      int add(DeviceChannel channel);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Update(value = {" <script>" +
 | 
	
	
		
			
				|  | @@ -58,6 +58,7 @@ public interface DeviceChannelMapper {
 | 
	
		
			
				|  |  |              "<if test='longitudeWgs84 != null'>, longitudeWgs84=${longitudeWgs84}</if>" +
 | 
	
		
			
				|  |  |              "<if test='latitudeWgs84 != null'>, latitudeWgs84=${latitudeWgs84}</if>" +
 | 
	
		
			
				|  |  |              "<if test='businessGroupId != null'>, businessGroupId=#{businessGroupId}</if>" +
 | 
	
		
			
				|  |  | +            "<if test='gpsTime != null'>, gpsTime=#{gpsTime}</if>" +
 | 
	
		
			
				|  |  |              "WHERE deviceId='${deviceId}' AND channelId='${channelId}'"+
 | 
	
		
			
				|  |  |              " </script>"})
 | 
	
		
			
				|  |  |      int update(DeviceChannel channel);
 | 
	
	
		
			
				|  | @@ -147,7 +148,7 @@ public interface DeviceChannelMapper {
 | 
	
		
			
				|  |  |              "(channelId, deviceId, name, manufacture, model, owner, civilCode, block, subCount, " +
 | 
	
		
			
				|  |  |              "  address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " +
 | 
	
		
			
				|  |  |              "  ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " +
 | 
	
		
			
				|  |  | -            "  longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId) " +
 | 
	
		
			
				|  |  | +            "  longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId, gpsTime) " +
 | 
	
		
			
				|  |  |              "values " +
 | 
	
		
			
				|  |  |              "<foreach collection='addChannels' index='index' item='item' separator=','> " +
 | 
	
		
			
				|  |  |              "('${item.channelId}', '${item.deviceId}', '${item.name}', '${item.manufacture}', '${item.model}', " +
 | 
	
	
		
			
				|  | @@ -157,7 +158,7 @@ public interface DeviceChannelMapper {
 | 
	
		
			
				|  |  |              "'${item.ipAddress}', ${item.port}, '${item.password}', ${item.PTZType}, ${item.status}, " +
 | 
	
		
			
				|  |  |              "'${item.streamId}', ${item.longitude}, ${item.latitude},${item.longitudeGcj02}, " +
 | 
	
		
			
				|  |  |              "${item.latitudeGcj02},${item.longitudeWgs84}, ${item.latitudeWgs84},'${item.createTime}', '${item.updateTime}', " +
 | 
	
		
			
				|  |  | -            "'${item.businessGroupId}') " +
 | 
	
		
			
				|  |  | +            "'${item.businessGroupId}', '${item.gpsTime}') " +
 | 
	
		
			
				|  |  |              "</foreach> " +
 | 
	
		
			
				|  |  |              "ON DUPLICATE KEY UPDATE " +
 | 
	
		
			
				|  |  |              "updateTime=VALUES(updateTime), " +
 | 
	
	
		
			
				|  | @@ -189,7 +190,8 @@ public interface DeviceChannelMapper {
 | 
	
		
			
				|  |  |              "latitudeGcj02=VALUES(latitudeGcj02), " +
 | 
	
		
			
				|  |  |              "longitudeWgs84=VALUES(longitudeWgs84), " +
 | 
	
		
			
				|  |  |              "latitudeWgs84=VALUES(latitudeWgs84), " +
 | 
	
		
			
				|  |  | -            "businessGroupId=VALUES(businessGroupId) " +
 | 
	
		
			
				|  |  | +            "businessGroupId=VALUES(businessGroupId), " +
 | 
	
		
			
				|  |  | +            "gpsTime=VALUES(gpsTime)" +
 | 
	
		
			
				|  |  |              "</script>")
 | 
	
		
			
				|  |  |      int batchAdd(List<DeviceChannel> addChannels);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -228,6 +230,7 @@ public interface DeviceChannelMapper {
 | 
	
		
			
				|  |  |              "<if test='item.longitudeWgs84 != null'>, longitudeWgs84=${item.longitudeWgs84}</if>" +
 | 
	
		
			
				|  |  |              "<if test='item.latitudeWgs84 != null'>, latitudeWgs84=${item.latitudeWgs84}</if>" +
 | 
	
		
			
				|  |  |              "<if test='item.businessGroupId != null'>, businessGroupId=#{item.businessGroupId}</if>" +
 | 
	
		
			
				|  |  | +            "<if test='item.gpsTime != null'>, gpsTime=#{item.gpsTime}</if>" +
 | 
	
		
			
				|  |  |              "WHERE deviceId='${item.deviceId}' AND channelId='${item.channelId}'"+
 | 
	
		
			
				|  |  |              "</foreach>" +
 | 
	
		
			
				|  |  |              "</script>"})
 | 
	
	
		
			
				|  | @@ -281,10 +284,11 @@ public interface DeviceChannelMapper {
 | 
	
		
			
				|  |  |              "SET " +
 | 
	
		
			
				|  |  |              "latitude=${latitude}, " +
 | 
	
		
			
				|  |  |              "longitude=${longitude}, " +
 | 
	
		
			
				|  |  | -            "longitudeGcj02=${longitudeGcj02}," +
 | 
	
		
			
				|  |  | -            "latitudeGcj02=${latitudeGcj02}," +
 | 
	
		
			
				|  |  | -            "longitudeWgs84=${longitudeWgs84}," +
 | 
	
		
			
				|  |  | -            "latitudeWgs84=${latitudeWgs84} " +
 | 
	
		
			
				|  |  | +            "longitudeGcj02=${longitudeGcj02}, " +
 | 
	
		
			
				|  |  | +            "latitudeGcj02=${latitudeGcj02}, " +
 | 
	
		
			
				|  |  | +            "longitudeWgs84=${longitudeWgs84}, " +
 | 
	
		
			
				|  |  | +            "latitudeWgs84=${latitudeWgs84}, " +
 | 
	
		
			
				|  |  | +            "gpsTime='${gpsTime}' " +
 | 
	
		
			
				|  |  |              "WHERE deviceId=#{deviceId} " +
 | 
	
		
			
				|  |  |              " <if test='channelId != null' >  AND channelId=#{channelId}</if>" +
 | 
	
		
			
				|  |  |              " </script>"})
 |