<?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="cn.iocoder.mall.productservice.dal.mysql.mapper.sku.ProductSkuMapper">

    <insert id="insertList" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
        INSERT INTO product_sku (
            spu_id, status, pic_url, attrs, price,
            quantity
        ) VALUES
        <foreach collection="productSkuDOs" item="productSkuDO" separator=",">
            (#{productSkuDO.spuId}, #{productSkuDO.status}, #{productSkuDO.picUrl}, #{productSkuDO.attrs}, #{productSkuDO.price},
             #{productSkuDO.quantity}
            )
        </foreach>
    </insert>

</mapper>
