|
|
<?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.ProductPoolMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ProductPool">
|
|
|
<result column="id" property="id" jdbcType="INTEGER"/>
|
|
|
<result column="pool_id" property="poolId" jdbcType="INTEGER"/>
|
|
|
<result column="product_skn" property="productSkn" jdbcType="INTEGER"/>
|
|
|
<result column="product_id" property="productId" jdbcType="INTEGER"/>
|
|
|
<result column="sales" property="sales" jdbcType="CHAR"/>
|
|
|
<result column="brand_id" property="brandId" jdbcType="SMALLINT"/>
|
|
|
<result column="status" property="status" jdbcType="TINYINT"/>
|
|
|
<result column="attribute" property="attribute" jdbcType="TINYINT"/>
|
|
|
<result column="small_sort_id" property="smallSortId" jdbcType="SMALLINT"/>
|
|
|
<result column="middle_sort_id" property="middleSortId" jdbcType="SMALLINT"/>
|
|
|
<result column="max_sort_id" property="maxSortId" jdbcType="SMALLINT"/>
|
|
|
<result column="gender" property="gender" jdbcType="CHAR"/>
|
|
|
<result column="storage_num" property="storageNum" jdbcType="DECIMAL"/>
|
|
|
<result column="market_price" property="marketPrice" jdbcType="DECIMAL"/>
|
|
|
<result column="sales_price" property="salesPrice" jdbcType="DECIMAL"/>
|
|
|
<result column="vip_discount_type" property="vipDiscountType" jdbcType="TINYINT"/>
|
|
|
<result column="is_discount" property="isDiscount" jdbcType="VARCHAR"/>
|
|
|
<result column="is_outlets" property="isOutlets" jdbcType="INTEGER"/>
|
|
|
<result column="size_ids" jdbcType="VARCHAR" property="sizeIds"/>
|
|
|
<result column="age_level" property="ageLevel" jdbcType="CHAR"/>
|
|
|
<result column="color_ids" property="colorIds" jdbcType="CHAR"/>
|
|
|
<result column="promotion_discount_int" property="promotionDiscountInt" jdbcType="DECIMAL"/>
|
|
|
<result column="promotion_discount" property="promotionDiscount" jdbcType="DECIMAL"/>
|
|
|
<result column="sales_num" property="salesNum" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, pool_id, product_skn,
|
|
|
product_id, sales, brand_id,
|
|
|
status, attribute, small_sort_id,
|
|
|
middle_sort_id, max_sort_id, gender,
|
|
|
storage_num, market_price,
|
|
|
sales_price, vip_discount_type, is_discount,
|
|
|
is_outlets, size_ids,age_level,color_ids,promotion_discount_int,promotion_discount,sales_num
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" timeout="20000">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from product_pool
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="getPageLists" resultMap="BaseResultMap" timeout="20000">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from product_pool limit #{offset},#{pageSize}
|
|
|
</select>
|
|
|
<select id="count" resultType="java.lang.Integer" timeout="20000">
|
|
|
SELECT count(*) FROM product_pool
|
|
|
</select>
|
|
|
<select id="selectListByIds" resultMap="BaseResultMap" timeout="20000">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from product_pool
|
|
|
where id in
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
</mapper> |
|
|
\ No newline at end of file |