ProductFeatureMapper.xml 4.88 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.search.dal.ProductFeatureMapper">
	<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ProductFeature">
		<id column="product_skn" property="productSkn" jdbcType="INTEGER" />
		<result column="brand_id" property="brandId" jdbcType="INTEGER" />
		<result column="small_sort_id" property="smallSortId" jdbcType="INTEGER" />
		<result column="skn_7_days_view" property="skn7DaysView" jdbcType="DOUBLE" />
		<result column="skn_7_days_view_web_rate" property="skn7DaysViewWebRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_view_sort_rate" property="skn7DaysViewSortRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_user_view" property="skn7DaysUserView" jdbcType="DOUBLE" />
		<result column="skn_7_days_user_view_web_rate" property="skn7DaysUserViewWebRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_user_view_sort_rate" property="skn7DaysUserViewSortRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_sale" property="skn7DaysSale" jdbcType="DOUBLE" />
		<result column="skn_7_days_sale_web_rate" property="skn7DaysSaleWebRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_sale_sort_rate" property="skn7DaysSaleSortRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_user_sale" property="skn7DaysUserSale" jdbcType="DOUBLE" />
		<result column="skn_7_days_user_sale_web_rate" property="skn7DaysUserSaleWebRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_user_sale_sort_rate" property="skn7DaysUserSaleSortRate" jdbcType="DOUBLE" />
		<result column="skn_7_days_covert_rate" property="skn7DaysCovertRate" jdbcType="DOUBLE" />
		<result column="brand_7_days_view" property="brand7DaysView" jdbcType="DOUBLE" />
		<result column="brand_7_days_view_web_rate" property="brand7DaysViewWebRate" jdbcType="DOUBLE" />
		<result column="brand_7_days_user_view" property="brand7DaysUserView" jdbcType="DOUBLE" />
		<result column="brand_7_days_user_view_web_rate" property="brand7DaysUserViewWebRate" jdbcType="DOUBLE" />
		<result column="brand_7_days_sale" property="brand7DaysSale" jdbcType="DOUBLE" />
		<result column="brand_7_days_sale_web_rate" property="brand7DaysSaleWebRate" jdbcType="DOUBLE" />
		<result column="brand_7_days_user_sale" property="brand7DaysUserSale" jdbcType="DOUBLE" />
		<result column="brand_7_days_user_sale_web_rate" property="brand7DaysUserSaleWebRate" jdbcType="DOUBLE" />
		<result column="brand_7_days_covert_rate" property="brand7DaysCovertRate" jdbcType="DOUBLE" />
		<result column="sort_7_days_view_web" property="sort7DaysViewWeb" jdbcType="DOUBLE" />
		<result column="sort_7_days_view_web_rate" property="sort7DaysViewWebRate" jdbcType="DOUBLE" />
		<result column="sort_7_days_user_view" property="sort7DaysUserView" jdbcType="DOUBLE" />
		<result column="sort_7_days_user_view_web_rate" property="sort7DaysUserViewWebRate" jdbcType="DOUBLE" />
		<result column="sort_7_days_sale" property="sort7DaysSale" jdbcType="DOUBLE" />
		<result column="sort_7_days_sale_web_rate" property="sort7DaysSaleWebRate" jdbcType="DOUBLE" />
		<result column="sort_7_days_user_sale" property="sort7DaysUserSale" jdbcType="DOUBLE" />
		<result column="sort_7_days_user_sale_web_rate" property="sort7DaysUserSaleWebRate" jdbcType="DOUBLE" />
		<result column="sort_7_days_covert_rate" property="sort7DaysCovertRate" jdbcType="DOUBLE" />
	</resultMap>
	<sql id="Base_Column_List">
		product_skn,
		brand_id,
		small_sort_id,
		skn_7_days_view,
		skn_7_days_view_web_rate,
		skn_7_days_view_sort_rate,
		skn_7_days_user_view,
		skn_7_days_user_view_web_rate,
		skn_7_days_user_view_sort_rate,
		skn_7_days_sale,
		skn_7_days_sale_web_rate,
		skn_7_days_sale_sort_rate,
		skn_7_days_user_sale,
		skn_7_days_user_sale_web_rate,
		skn_7_days_user_sale_sort_rate,
		skn_7_days_covert_rate,
		brand_7_days_view,
		brand_7_days_view_web_rate,
		brand_7_days_user_view,
		brand_7_days_user_view_web_rate,
		brand_7_days_sale,
		brand_7_days_sale_web_rate,
		brand_7_days_user_sale,
		brand_7_days_user_sale_web_rate,
		brand_7_days_covert_rate,
		sort_7_days_view_web,
		sort_7_days_view_web_rate,
		sort_7_days_user_view,
		sort_7_days_user_view_web_rate,
		sort_7_days_sale,
		sort_7_days_sale_web_rate,
		sort_7_days_user_sale,
		sort_7_days_user_sale_web_rate,
		sort_7_days_covert_rate
	</sql>
	<select id="getBySkns" resultMap="BaseResultMap" timeout="20000">
		select
		<include refid="Base_Column_List" />
		from product_feature
		where product_skn in
		<foreach item="item" index="index" collection="list" open="("
			separator="," close=")">
			#{item}
		</foreach>
	</select>
	
	<select id="getBySknId" resultMap="BaseResultMap" parameterType="java.lang.Integer" timeout="20000">
        select
        <include refid="Base_Column_List" />
        from product_feature
        where product_skn = #{productSkn, jdbcType=INTEGER}
    </select>
</mapper>