CampaignProductDao.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.CampaignProductDao">
    <!--查询所有商品所在的主题-->
    <select id="findByProductIdIn" resultMap="BaseResultMap">
        SELECT * FROM `campaign_product` WHERE product_id IN
        <foreach collection="productIds" item="productId" separator="," open="(" close=")">
            #{productId}
        </foreach>
    </select>
    <resultMap id="BaseResultMap" type="com.sibu.orderHelper.integral.model.CampaignProduct">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="campaign_id" jdbcType="INTEGER" property="campaignId"/>
        <result column="product_id" jdbcType="VARCHAR" property="productId"/>
        <result column="product_type" jdbcType="TINYINT" property="productType"/>
        <result column="is_show" jdbcType="TINYINT" property="isShow"/>
        <result column="campaign_sort_index" jdbcType="INTEGER" property="campaignSortIndex"/>
    </resultMap>
</mapper>