|
|
<?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.yohoufo.dal.product.ProductSelfShelvesPicMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.ProductSelfShelvesPic" >
|
|
|
<resultMap id="BaseResultMap" type="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="self_shelves_id" property="selfShelvesId" jdbcType="INTEGER" />
|
|
|
<result column="picture_url" property="pictureUrl" jdbcType="VARCHAR" />
|
...
|
...
|
@@ -19,37 +19,15 @@ |
|
|
delete from product_self_shelves_pic
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
|
|
|
insert into product_self_shelves_pic (id, self_shelves_id, picture_url
|
|
|
)
|
|
|
values (#{id,jdbcType=INTEGER}, #{selfShelvesId,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
|
|
|
insert into product_self_shelves_pic
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="selfShelvesId != null" >
|
|
|
self_shelves_id,
|
|
|
</if>
|
|
|
<if test="pictureUrl != null" >
|
|
|
picture_url,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="selfShelvesId != null" >
|
|
|
#{selfShelvesId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="pictureUrl != null" >
|
|
|
#{pictureUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
|
|
|
<insert id="insertBatch">
|
|
|
insert into product_self_shelves_pic (self_shelves_id, picture_url)
|
|
|
values
|
|
|
<foreach collection="imageList" item="item" index="index" separator=",">
|
|
|
(#{selfShelvesId,jdbcType=INTEGER}, #{item,jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.product.model.ProductSelfShelvesPic" >
|
|
|
update product_self_shelves_pic
|
|
|
<set >
|
...
|
...
|
|