mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-06 14:07:49 +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.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@ -43,11 +43,11 @@ public interface AlarmMapper {
|
|||||||
@Insert("<script>" +
|
@Insert("<script>" +
|
||||||
"INSERT INTO wvp_alarm (channel_id, description, snap_path, record_path, longitude, latitude, alarm_type, alarm_time)" +
|
"INSERT INTO wvp_alarm (channel_id, description, snap_path, record_path, longitude, latitude, alarm_type, alarm_time)" +
|
||||||
" VALUES " +
|
" VALUES " +
|
||||||
"<foreach collection='handlerCatchDataList' item='item' open='(' separator=',' close=')'>" +
|
"<foreach collection='handlerCatchDataList' item='item' separator=','>" +
|
||||||
"#{item.channelId}, #{item.description}, #{item.snapPath}, #{item.recordPath}, #{item.longitude}, #{item.latitude}, #{item.alarmType}, #{item.alarmTime}" +
|
"(#{item.channelId}, #{item.description}, #{item.snapPath}, #{item.recordPath}, #{item.longitude}, #{item.latitude}, #{item.alarmType}, #{item.alarmTime})" +
|
||||||
"</foreach>" +
|
"</foreach>" +
|
||||||
"</script>")
|
"</script>")
|
||||||
void insertAlarms(List<Alarm> handlerCatchDataList);
|
void insertAlarms(@Param("handlerCatchDataList") List<Alarm> handlerCatchDataList);
|
||||||
|
|
||||||
@Select("SELECT snap_path FROM wvp_alarm WHERE id = #{id}")
|
@Select("SELECT snap_path FROM wvp_alarm WHERE id = #{id}")
|
||||||
String getSnapPathById(@Param("id") Long id);
|
String getSnapPathById(@Param("id") Long id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user