|
|
<?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.ProductIndexMapper" >
|
|
|
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ProductIndex" >
|
|
|
<result column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="product_id" property="productId" jdbcType="INTEGER" />
|
|
|
<result column="shop_id" property="shopId" jdbcType="INTEGER" />
|
|
|
<result column="sales_num" property="salesNum" jdbcType="INTEGER" />
|
|
|
<result column="shelve_time" property="shelveTime" jdbcType="INTEGER" />
|
|
|
<result column="shelve_day" property="shelveDay" jdbcType="VARCHAR" />
|
|
|
<result column="cn_alphabet" property="cnAlphabet" jdbcType="VARCHAR" />
|
|
|
<result column="product_name" property="productName" jdbcType="VARCHAR" />
|
|
|
<result column="brand_name_cn" property="brandNameCn" jdbcType="VARCHAR" />
|
|
|
<result column="brand_name_en" property="brandNameEn" jdbcType="VARCHAR" />
|
|
|
<result column="brand_keyword" property="brandKeyword" jdbcType="VARCHAR" />
|
|
|
<result column="hot_keyword" property="hotKeyword" jdbcType="VARCHAR" />
|
|
|
<result column="brand_name" property="brandName" jdbcType="VARCHAR" />
|
|
|
<result column="style" property="style" jdbcType="VARCHAR" />
|
|
|
<result column="sales_phrase" property="salesPhrase" jdbcType="VARCHAR" />
|
|
|
<result column="max_sort_id" property="maxSortId" jdbcType="SMALLINT" />
|
|
|
<result column="max_sort_name" property="maxSortName" jdbcType="VARCHAR" />
|
|
|
<result column="middle_sort_id" property="middleSortId" jdbcType="SMALLINT" />
|
|
|
<result column="middle_sort_name" property="middleSortName" jdbcType="VARCHAR" />
|
|
|
<result column="small_sort_id" property="smallSortId" jdbcType="SMALLINT" />
|
|
|
<result column="small_sort_name" property="smallSortName" jdbcType="VARCHAR" />
|
|
|
<result column="gender" property="gender" jdbcType="CHAR" />
|
|
|
<result column="brand_id" property="brandId" jdbcType="SMALLINT" />
|
|
|
<result column="is_special" property="isSpecial" jdbcType="CHAR" />
|
|
|
<result column="status" property="status" jdbcType="TINYINT" />
|
|
|
<result column="seasons_s" property="seasonsS" jdbcType="INTEGER" />
|
|
|
<result column="isspecial" property="isspecial" jdbcType="INTEGER" />
|
|
|
<result column="is_hot" property="isHot" jdbcType="CHAR" />
|
|
|
<result column="folder_id" property="folderId" jdbcType="INTEGER" />
|
|
|
<result column="ishot" property="ishot" jdbcType="INTEGER" />
|
|
|
<result column="ispromotion" property="ispromotion" jdbcType="SMALLINT" />
|
|
|
<result column="series_id" property="seriesId" jdbcType="INTEGER" />
|
|
|
<result column="is_sales" property="isSales" jdbcType="CHAR" />
|
|
|
<result column="issales" property="issales" jdbcType="INTEGER" />
|
|
|
<result column="is_advance" property="isAdvance" jdbcType="CHAR" />
|
|
|
<result column="isadvance" property="isadvance" jdbcType="INTEGER" />
|
|
|
<result column="is_auditing" property="isAuditing" jdbcType="CHAR" />
|
|
|
<result column="isauditing" property="isauditing" jdbcType="INTEGER" />
|
|
|
<result column="attribute" property="attribute" jdbcType="TINYINT" />
|
|
|
<result column="seasons" property="seasons" jdbcType="CHAR" />
|
|
|
<result column="is_down" property="isDown" jdbcType="CHAR" />
|
|
|
<result column="isdown" property="isdown" jdbcType="INTEGER" />
|
|
|
<result column="isrecommend" property="isrecommend" jdbcType="INTEGER" />
|
|
|
<result column="is_outlets" property="isOutlets" jdbcType="INTEGER" />
|
|
|
<result column="first_shelve_time" property="firstShelveTime" jdbcType="INTEGER" />
|
|
|
<result column="special_price" property="specialPrice" jdbcType="DECIMAL" />
|
|
|
<result column="market_price" property="marketPrice" jdbcType="DECIMAL" />
|
|
|
<result column="vip_discount_type" property="vipDiscountType" jdbcType="TINYINT" />
|
|
|
<result column="vip_price" property="vipPrice" jdbcType="DECIMAL" />
|
|
|
<result column="vip1_price" property="vip1Price" jdbcType="DECIMAL" />
|
|
|
<result column="vip2_price" property="vip2Price" jdbcType="DECIMAL" />
|
|
|
<result column="vip3_price" property="vip3Price" jdbcType="DECIMAL" />
|
|
|
<result column="student_price" property="studentPrice" jdbcType="DECIMAL" />
|
|
|
<result column="is_student_price" property="isStudentPrice" jdbcType="VARCHAR" />
|
|
|
<result column="sales_price" property="salesPrice" jdbcType="DECIMAL" />
|
|
|
<result column="promotion_discount_int" property="promotionDiscountInt" jdbcType="DECIMAL" />
|
|
|
<result column="promotion_discount" property="promotionDiscount" jdbcType="DECIMAL" />
|
|
|
<result column="specialoffer" property="specialoffer" jdbcType="CHAR" />
|
|
|
<result column="sell_channels" property="sellChannels" jdbcType="CHAR" />
|
|
|
<result column="product_skn" property="productSkn" jdbcType="INTEGER" />
|
|
|
<result column="storage_num" property="storageNum" jdbcType="DECIMAL" />
|
|
|
<result column="islimited" property="islimited" jdbcType="CHAR" />
|
|
|
<result column="isnew" property="isnew" jdbcType="CHAR" />
|
|
|
<result column="color_ids" property="colorIds" jdbcType="VARCHAR" />
|
|
|
<result column="color_names" property="colorNames" jdbcType="VARCHAR" />
|
|
|
<result column="size_ids" property="sizeIds" jdbcType="VARCHAR" />
|
|
|
<result column="size_names" property="sizeNames" jdbcType="VARCHAR" />
|
|
|
<result column="standard_ids" property="standardIds" jdbcType="VARCHAR" />
|
|
|
<result column="standard_names" property="standardNames" jdbcType="VARCHAR" />
|
|
|
<result column="style_ids" property="styleIds" jdbcType="VARCHAR" />
|
|
|
<result column="default_images" property="defaultImages" jdbcType="VARCHAR" />
|
|
|
<result column="gender_s" property="genderS" jdbcType="VARCHAR" />
|
|
|
<result column="brand_domain" property="brandDomain" jdbcType="VARCHAR" />
|
|
|
<result column="brand_alif" property="brandAlif" jdbcType="VARCHAR" />
|
|
|
<result column="edit_time" property="editTime" jdbcType="INTEGER" />
|
|
|
<result column="is_soon_sold_out" property="isSoonSoldOut" jdbcType="VARCHAR" />
|
|
|
<result column="is_discount" property="isDiscount" jdbcType="VARCHAR" />
|
|
|
<result column="is_sold_out" property="isSoldOut" jdbcType="VARCHAR" />
|
|
|
<result column="sold_out" property="soldOut" jdbcType="INTEGER" />
|
|
|
<result column="sort_weight" property="sortWeight" jdbcType="INTEGER" />
|
|
|
<result column="yohood_id" property="yohoodId" jdbcType="VARCHAR" />
|
|
|
<result column="standard_only_names" property="standardOnlyNames" jdbcType="VARCHAR" />
|
|
|
<result column="max_sort" property="maxSort" jdbcType="VARCHAR" />
|
|
|
<result column="middle_sort" property="middleSort" jdbcType="VARCHAR" />
|
|
|
<result column="small_sort" property="smallSort" jdbcType="VARCHAR" />
|
|
|
<result column="brand_weight" property="brandWeight" jdbcType="INTEGER" />
|
|
|
<result column="base_pin_ratio" property="basePinRatio" jdbcType="DOUBLE" />
|
|
|
<result column="breaking_rate" property="breakingRate" jdbcType="DOUBLE" />
|
|
|
<result column="discount_score" property="discountScore" jdbcType="DOUBLE" />
|
|
|
<result column="pool_id" property="poolId" jdbcType="VARCHAR" />
|
|
|
<result column="product_keyword" property="productKeyword" jdbcType="VARCHAR" />
|
|
|
<result column="age_level" property="ageLevel" jdbcType="VARCHAR" />
|
|
|
<result column="app_type" property="appType" jdbcType="INTEGER" />
|
|
|
<result column="is_instalment" property="isInstalment" jdbcType="VARCHAR" />
|
|
|
<result column="is_seckill" property="isSeckill" jdbcType="CHAR" />
|
|
|
<result column="country_id" property="countryId" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<resultMap id="ResultMapWithBLOBs" type="com.yoho.search.dal.model.ProductIndex" extends="BaseResultMap" >
|
|
|
<result column="goods_list" property="goodsList" jdbcType="LONGVARCHAR" />
|
|
|
<result column="activities" property="activities" jdbcType="LONGVARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, product_id,shop_id, sales_num, shelve_time, shelve_day, cn_alphabet, product_name,
|
|
|
brand_name_cn, brand_name_en, brand_keyword, hot_keyword, brand_name, style,
|
|
|
sales_phrase, max_sort_id, middle_sort_id, small_sort_id, gender, brand_id,
|
|
|
is_special, status, seasons_s, isspecial, is_hot, folder_id,
|
|
|
ishot, ispromotion, series_id, is_sales, issales, is_advance,
|
|
|
isadvance, is_auditing, isauditing, attribute, seasons, is_down,
|
|
|
isdown, isrecommend, is_outlets, first_shelve_time, special_price, market_price,
|
|
|
vip_discount_type, vip_price, vip1_price, vip2_price, vip3_price,student_price,is_student_price, sales_price,
|
|
|
promotion_discount_int, promotion_discount, specialoffer, sell_channels, product_skn,
|
|
|
storage_num, islimited, isnew,color_ids,color_names,size_ids,size_names,standard_ids,standard_names,style_ids,default_images,
|
|
|
max_sort_name,middle_sort_name,small_sort_name,gender_s,brand_domain,
|
|
|
brand_alif,goods_list,edit_time,is_soon_sold_out,is_discount,activities,is_sold_out,sold_out,
|
|
|
sort_weight,yohood_id,standard_only_names,max_sort,middle_sort,small_sort,brand_weight,base_pin_ratio,breaking_rate,
|
|
|
discount_score,pool_id,product_keyword,age_level,app_type,is_instalment,is_seckill,country_id
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" timeout="20000">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from product_index
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="selectByProductSkn" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" timeout="20000">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from product_index
|
|
|
where product_skn = #{product_skn,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="count" resultType="java.lang.Integer" timeout="20000">
|
|
|
SELECT count(*) FROM product_index
|
|
|
</select>
|
|
|
<select id="getPageLists" resultMap="ResultMapWithBLOBs" timeout="20000">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from product_index limit #{offset},#{pageSize}
|
|
|
</select>
|
|
|
<resultMap id="ids" type="Integer">
|
|
|
<result column="product_skn" property="productSkn" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
<select id="getSknsPage" resultMap="ids" timeout="20000">
|
|
|
select product_skn
|
|
|
<include refid="Base_Column_List" />
|
|
|
from product_index
|
|
|
limit #{offset},#{pageSize}
|
|
|
</select>
|
|
|
</mapper> |
|
|
\ No newline at end of file |