<?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.iotechn.unimall.data.mapper.ImgMapper">

    <select id="getImgs" resultType="java.lang.String">
        SELECT url FROM unimall_img WHERE biz_type = #{bizType} AND biz_id = #{bizId};
    </select>

    <insert id="insertImgs" parameterType="list">
        INSERT INTO
            unimall_img
            (biz_type,biz_id,url,gmt_update,gmt_create)
        VALUES
        <foreach collection="list" separator="," item="imgDO" index="i">
            (
            #{imgDO.bizType},
            #{imgDO.bizId},
            #{imgDO.url},
            #{imgDO.gmtUpdate},
            #{imgDO.gmtCreate}
            )
        </foreach>
    </insert>

</mapper>