UfoProductPoolDetailMapper.xml
1.1 KB
<?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.yoho.ufo.dal.UfoProductPoolDetailMapper">
<resultMap id="productPoolDetails" type="com.yoho.ufo.model.goodsmanage.ProductPoolDetails">
</resultMap>
<sql id="queryColumns">
product.id, product.product_code, product.product_name, product.product_code, brand.brand_name, product_sort.sort_name
</sql>
<insert id="batchInsertProductPoolDetails" parameterType="list">
insert into product_pool_detail(pool_id, product_id, create_time) values
<foreach collection="list" item="item" separator="," index="index">
(#{item.poolId}, #{item.productId}, #{item.createTime})
</foreach>
</insert>
<delete id="deleteProductPoolDetailsByPoolId">
delete from product_pool_detail where pool_id = #{poolId}
</delete>
<delete id="deleteProductPoolDetail">
DELETE FROM product_pool_detail WHERE pool_id = #{productPoolId} AND product_id = #{productId}
</delete>
</mapper>