Authored by hugufei

拼团购商品索引添加起售数量字段

... ... @@ -11,10 +11,11 @@
<result column="update_time" property="updateTime" jdbcType="INTEGER"/>
<result column="status" property="status" jdbcType="TINYINT"/>
<result column="order_by" property="orderBy" jdbcType="INTEGER"/>
<result column="sale_num" property="saleNum" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id, activity_id, product_skn, collage_price, create_time, update_time, status, order_by
id, activity_id, product_skn, collage_price, create_time, update_time, status, order_by, sale_num
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
... ... @@ -29,12 +30,16 @@
</delete>
<insert id="insert" parameterType="com.yoho.search.dal.model.CollageProduct">
insert into collage_product (id, activity_id, product_skn,
insert into collage_product (
id, activity_id, product_skn,
collage_price, create_time, update_time,
status, order_by)
values (#{id,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, #{productSkn,jdbcType=INTEGER},
status, order_by, sale_num
)
values (
#{id,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, #{productSkn,jdbcType=INTEGER},
#{collagePrice,jdbcType=DECIMAL}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER},
#{status,jdbcType=TINYINT}, #{orderBy,jdbcType=INTEGER})
#{status,jdbcType=TINYINT}, #{orderBy,jdbcType=INTEGER}, #{saleNum,jdbcType=INTEGER}
)
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.CollageProduct">
... ... @@ -61,6 +66,9 @@
<if test="orderBy != null">
order_by = #{orderBy,jdbcType=INTEGER},
</if>
<if test="saleNum != null">
sale_num = #{saleNum,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
... ... @@ -75,12 +83,6 @@
from collage_product limit #{offset},#{pageSize}
</select>
<select id="selectListsByActivityId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
from collage_product
where activity_id = #{activityId,jdbcType=INTEGER}
</select>
<select id="selectListByActivityIds" resultMap="BaseResultMap" timeout="20000">
select
... ...
... ... @@ -2,12 +2,10 @@ package com.yoho.search.consumer.index.increment.yh_shops;
import com.alibaba.fastjson.JSONObject;
import com.yoho.search.base.utils.ConvertUtils;
import com.yoho.search.base.utils.EventReportEnum;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.base.utils.ProductIndexEsField;
import com.yoho.search.consumer.common.IYohoIndexService;
import com.yoho.search.consumer.index.increment.AbstractMqListener;
import com.yoho.search.consumer.service.bo.CollageActivityProductBO;
import com.yoho.search.consumer.service.bo.CollageInfoBO;
import com.yoho.search.consumer.service.daoService.CollageProductService;
import com.yoho.search.consumer.service.daoService.ProductService;
... ... @@ -83,4 +81,5 @@ public class CollageProductMqListener extends AbstractMqListener {
this.updateProductIndexWithDataMap(indexData, productId);
}
}
... ...
... ... @@ -24,6 +24,9 @@
},
"orderBy": {
"type": "integer"
},
"saleNum": {
"type": "integer"
}
}
}
... ...