<?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="com.ruoyi.ibs.draw.mapper.DrawShapeCustMapper">
    <insert id="batchInsert">
        INSERT INTO draw_shape_cust_${dept} (shape_id, layer_id, cust_id, cust_name, cust_type, address_name, province,
        city, county, street, community, address_detail) VALUES
        <foreach collection="custList" item="cust" separator=",">
            (#{cust.shapeId}, #{cust.layerId}, #{cust.custId}, #{cust.custName}, #{cust.custType}, #{cust.addressName},
            #{cust.province},#{cust.city},#{cust.county},#{cust.street},#{cust.community},#{cust.addressDetail})
        </foreach>
    </insert>
    <delete id="batchDelete">
        DELETE
        FROM draw_shape_cust_${dept}
        WHERE shape_id = #{shapeId}
    </delete>
</mapper>