IMMallProductSupplierMapper.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.sibu.orderHelper.integral.dao.IMMallProductSupplierDao">
    <select id="findByProductIdIn" parameterType="java.util.List"
            resultMap="BaseResultMap">
        select * from im_product_supplier where product_id in
        <foreach collection="list" item="item" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
    <select id="findByProductId" resultMap="BaseResultMap">
        select * from im_product_supplier where product_id = #{productId}
    </select>
    <resultMap id="BaseResultMap" type="com.sibu.orderHelper.integral.model.IMProductSupplier">
        <id column="id" jdbcType="VARCHAR" property="id"/>
        <result column="product_id" jdbcType="VARCHAR" property="productId"/>
        <result column="supplier_id" jdbcType="VARCHAR" property="supplierId"/>
        <result column="create_dt" jdbcType="TIMESTAMP" property="createDt"/>
    </resultMap>
</mapper>