share-platform/renren-admin/src/main/resources/mapper/monitor/CameraOrganizationMapper.xml

32 lines
1.3 KiB
XML
Raw Normal View History

2022-05-31 11:11:13 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.monitor.mapper.CameraOrgenizationMapper">
2022-07-13 15:10:02 +08:00
<insert id="batchSaveOrgenization" parameterType="java.util.List">
2022-05-31 11:11:13 +08:00
2022-07-13 15:10:02 +08:00
INSERT INTO t_camera_organization02 (
id,name,parent_id,sort,subCount,is_parent,path
) VALUES
<foreach collection="list" item="item" separator="," >
(
#{item.id},#{item.name},#{item.parentId},#{item.sort},#{item.subCount},case when #{item.isParent} = true then 1 else 0 end,#{item.name}
)
</foreach>
</insert>
<insert id="batchSaveCameraChannel" parameterType="java.util.List">
INSERT INTO t_camera_channel01
(
channel_code,channel_id,channel_name,gps_x,gps_y,status,
parent_id,region_code,region_name,node_name
)
VALUES
<foreach collection="list" item="item" separator="," >
(
#{item.channelCode},#{item.channelId},#{item.channelName},#{item.gpsX},#{item.gpsY},#{item.status},
#{item.parentId},#{item.regionCode},#{item.regionName},TRIM(TRAILING '->' FROM #{item.nodeName})
)
</foreach>
</insert>
2022-05-31 11:11:13 +08:00
</mapper>