mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-06 06:06:08 +08:00
优化报警信息入库逻辑
This commit is contained in:
parent
149c5a550b
commit
280ed4aee3
@ -31,7 +31,6 @@ import org.springframework.stereotype.Service;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
@Slf4j
|
||||
|
||||
@ -43,11 +43,11 @@ public interface AlarmMapper {
|
||||
@Insert("<script>" +
|
||||
"INSERT INTO wvp_alarm (channel_id, description, snap_path, record_path, longitude, latitude, alarm_type, alarm_time)" +
|
||||
" VALUES " +
|
||||
"<foreach collection='handlerCatchDataList' item='item' open='(' separator=',' close=')'>" +
|
||||
"#{item.channelId}, #{item.description}, #{item.snapPath}, #{item.recordPath}, #{item.longitude}, #{item.latitude}, #{item.alarmType}, #{item.alarmTime}" +
|
||||
"<foreach collection='handlerCatchDataList' item='item' separator=','>" +
|
||||
"(#{item.channelId}, #{item.description}, #{item.snapPath}, #{item.recordPath}, #{item.longitude}, #{item.latitude}, #{item.alarmType}, #{item.alarmTime})" +
|
||||
"</foreach>" +
|
||||
"</script>")
|
||||
void insertAlarms(List<Alarm> handlerCatchDataList);
|
||||
void insertAlarms(@Param("handlerCatchDataList") List<Alarm> handlerCatchDataList);
|
||||
|
||||
@Select("SELECT snap_path FROM wvp_alarm WHERE id = #{id}")
|
||||
String getSnapPathById(@Param("id") Long id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user