Merge branch 'gray' into wn_promotion
# Conflicts: # index/src/main/java/com/yoho/search/consumer/index/increment/ActivityProductMqListener.java # index/src/main/java/com/yoho/search/consumer/index/increment/ProductPriceMqListener.java
Showing
11 changed files
with
150 additions
and
238 deletions
@@ -14,18 +14,12 @@ public interface ProductMapper { | @@ -14,18 +14,12 @@ public interface ProductMapper { | ||
14 | 14 | ||
15 | int updateByPrimaryKeySelective(Product record); | 15 | int updateByPrimaryKeySelective(Product record); |
16 | 16 | ||
17 | - int updateByPrimaryKey(Product record); | ||
18 | - | ||
19 | List<Product> selectPageLists(@Param(value = "offset") Integer offset, @Param(value = "pageSize") Integer pageSize); | 17 | List<Product> selectPageLists(@Param(value = "offset") Integer offset, @Param(value = "pageSize") Integer pageSize); |
20 | 18 | ||
21 | Integer selectProductIdBySkn(Integer productSkn); | 19 | Integer selectProductIdBySkn(Integer productSkn); |
22 | 20 | ||
23 | Integer selectSknByProductId(Integer productId); | 21 | Integer selectSknByProductId(Integer productId); |
24 | 22 | ||
25 | - List<Product> selectSknsByProductIds(List<Integer> productIds); | ||
26 | - | ||
27 | - List<Product> selectAll(); | ||
28 | - | ||
29 | int selectCount(); | 23 | int selectCount(); |
30 | 24 | ||
31 | Product selectBySkn(Integer skn); | 25 | Product selectBySkn(Integer skn); |
@@ -10,14 +10,10 @@ public interface ProductPriceMapper { | @@ -10,14 +10,10 @@ public interface ProductPriceMapper { | ||
10 | 10 | ||
11 | int insert(ProductPrice record); | 11 | int insert(ProductPrice record); |
12 | 12 | ||
13 | - int insertSelective(ProductPrice record); | ||
14 | - | ||
15 | ProductPrice selectByPrimaryKey(Integer productId); | 13 | ProductPrice selectByPrimaryKey(Integer productId); |
16 | 14 | ||
17 | int updateByPrimaryKeySelective(ProductPrice record); | 15 | int updateByPrimaryKeySelective(ProductPrice record); |
18 | 16 | ||
19 | - int updateByPrimaryKey(ProductPrice record); | ||
20 | - | ||
21 | List<ProductPrice> selectPageLists(@Param(value="offset")Integer offset, @Param(value="pageSize")Integer pageSize); | 17 | List<ProductPrice> selectPageLists(@Param(value="offset")Integer offset, @Param(value="pageSize")Integer pageSize); |
22 | 18 | ||
23 | List<ProductPrice> selectByIds(List<Integer> ids); | 19 | List<ProductPrice> selectByIds(List<Integer> ids); |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | <mapper namespace="com.yoho.search.dal.ProductMapper"> | 3 | <mapper namespace="com.yoho.search.dal.ProductMapper"> |
4 | + | ||
4 | <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.Product"> | 5 | <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.Product"> |
5 | <id column="id" property="id" jdbcType="INTEGER"/> | 6 | <id column="id" property="id" jdbcType="INTEGER"/> |
6 | <result column="shop_id" property="shopId" jdbcType="INTEGER"/> | 7 | <result column="shop_id" property="shopId" jdbcType="INTEGER"/> |
@@ -56,7 +57,9 @@ | @@ -56,7 +57,9 @@ | ||
56 | <result column="is_seckill" property="isSeckill" jdbcType="CHAR"/> | 57 | <result column="is_seckill" property="isSeckill" jdbcType="CHAR"/> |
57 | <result column="market_phrase" property="marketPhrase" jdbcType="VARCHAR"/> | 58 | <result column="market_phrase" property="marketPhrase" jdbcType="VARCHAR"/> |
58 | <result column="bundle_type" property="bundleType" jdbcType="INTEGER"/> | 59 | <result column="bundle_type" property="bundleType" jdbcType="INTEGER"/> |
60 | + <result column="coupon_limit_status" property="couponLimitStatus" jdbcType="INTEGER"/> | ||
59 | </resultMap> | 61 | </resultMap> |
62 | + | ||
60 | <sql id="Base_Column_List"> | 63 | <sql id="Base_Column_List"> |
61 | id, erp_product_id,shop_id, product_name, cn_alphabet, | 64 | id, erp_product_id,shop_id, product_name, cn_alphabet, |
62 | phrase, sales_phrase, brand_id, max_sort_id, middle_sort_id, | 65 | phrase, sales_phrase, brand_id, max_sort_id, middle_sort_id, |
@@ -67,8 +70,9 @@ | @@ -67,8 +70,9 @@ | ||
67 | first_shelve_time,shelve_time,expect_arrival_time, create_time, arrival_time, | 70 | first_shelve_time,shelve_time,expect_arrival_time, create_time, arrival_time, |
68 | edit_time, auditing_time, is_down, status, is_edit, | 71 | edit_time, auditing_time, is_down, status, is_edit, |
69 | vip_discount_type, storage,is_outlets,folder_id,sell_channels, | 72 | vip_discount_type, storage,is_outlets,folder_id,sell_channels, |
70 | - elements, age_level,app_type,is_instalment,is_seckill,is_limitbuy,is_deposit_advance,market_phrase,bundle_type | 73 | + elements, age_level,app_type,is_instalment,is_seckill,is_limitbuy,is_deposit_advance,market_phrase,bundle_type,coupon_limit_status |
71 | </sql> | 74 | </sql> |
75 | + | ||
72 | <select id="selectByPrimaryKey" resultMap="BaseResultMap" | 76 | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
73 | parameterType="java.lang.Integer" timeout="20000"> | 77 | parameterType="java.lang.Integer" timeout="20000"> |
74 | select | 78 | select |
@@ -76,6 +80,7 @@ | @@ -76,6 +80,7 @@ | ||
76 | from product | 80 | from product |
77 | where id = #{id,jdbcType=INTEGER} | 81 | where id = #{id,jdbcType=INTEGER} |
78 | </select> | 82 | </select> |
83 | + | ||
79 | <select id="selectBySkn" resultMap="BaseResultMap" | 84 | <select id="selectBySkn" resultMap="BaseResultMap" |
80 | parameterType="java.lang.Integer" timeout="20000"> | 85 | parameterType="java.lang.Integer" timeout="20000"> |
81 | select | 86 | select |
@@ -84,11 +89,13 @@ | @@ -84,11 +89,13 @@ | ||
84 | where erp_product_id = #{skn,jdbcType=INTEGER} | 89 | where erp_product_id = #{skn,jdbcType=INTEGER} |
85 | limit 1 | 90 | limit 1 |
86 | </select> | 91 | </select> |
92 | + | ||
87 | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" | 93 | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" |
88 | timeout="20000"> | 94 | timeout="20000"> |
89 | delete from product | 95 | delete from product |
90 | where id = #{id,jdbcType=INTEGER} | 96 | where id = #{id,jdbcType=INTEGER} |
91 | </delete> | 97 | </delete> |
98 | + | ||
92 | <insert id="insert" parameterType="com.yoho.search.dal.model.Product" | 99 | <insert id="insert" parameterType="com.yoho.search.dal.model.Product" |
93 | timeout="20000"> | 100 | timeout="20000"> |
94 | insert ignore into product (id, erp_product_id,shop_id, | 101 | insert ignore into product (id, erp_product_id,shop_id, |
@@ -112,7 +119,7 @@ | @@ -112,7 +119,7 @@ | ||
112 | status, is_edit, vip_discount_type, | 119 | status, is_edit, vip_discount_type, |
113 | storage, | 120 | storage, |
114 | is_outlets, folder_id, | 121 | is_outlets, folder_id, |
115 | - sell_channels, elements,age_level,app_type,is_instalment,is_seckill,is_deposit_advance,is_limitbuy,market_phrase,bundle_type) | 122 | + sell_channels, elements,age_level,app_type,is_instalment,is_seckill,is_deposit_advance,is_limitbuy,market_phrase,bundle_type,coupon_limit_status) |
116 | values | 123 | values |
117 | (#{id,jdbcType=INTEGER}, | 124 | (#{id,jdbcType=INTEGER}, |
118 | #{erpProductId,jdbcType=INTEGER}, | 125 | #{erpProductId,jdbcType=INTEGER}, |
@@ -154,9 +161,11 @@ | @@ -154,9 +161,11 @@ | ||
154 | #{isDepositAdvance,jdbcType=CHAR}, | 161 | #{isDepositAdvance,jdbcType=CHAR}, |
155 | #{isLimitbuy,jdbcType=CHAR}, | 162 | #{isLimitbuy,jdbcType=CHAR}, |
156 | #{marketPhrase,jdbcType=VARCHAR}, | 163 | #{marketPhrase,jdbcType=VARCHAR}, |
157 | - #{bundleType,jdbcType=INTEGER} | 164 | + #{bundleType,jdbcType=INTEGER}, |
165 | + #{couponLimitStatus,jdbcType=INTEGER} | ||
158 | ) | 166 | ) |
159 | </insert> | 167 | </insert> |
168 | + | ||
160 | <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.Product" | 169 | <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.Product" |
161 | timeout="20000"> | 170 | timeout="20000"> |
162 | update product | 171 | update product |
@@ -321,34 +330,37 @@ | @@ -321,34 +330,37 @@ | ||
321 | <if test="bundleType != null"> | 330 | <if test="bundleType != null"> |
322 | bundle_type = #{bundleType,jdbcType=INTEGER}, | 331 | bundle_type = #{bundleType,jdbcType=INTEGER}, |
323 | </if> | 332 | </if> |
333 | + <if test="couponLimitStatus != null"> | ||
334 | + coupon_limit_status = #{couponLimitStatus,jdbcType=INTEGER}, | ||
335 | + </if> | ||
324 | </set> | 336 | </set> |
325 | where id = #{id,jdbcType=INTEGER} | 337 | where id = #{id,jdbcType=INTEGER} |
326 | </update> | 338 | </update> |
339 | + | ||
327 | <select id="selectCount" resultType="java.lang.Integer" timeout="20000"> | 340 | <select id="selectCount" resultType="java.lang.Integer" timeout="20000"> |
328 | SELECT count(*) FROM product | 341 | SELECT count(*) FROM product |
329 | </select> | 342 | </select> |
343 | + | ||
330 | <select id="selectProductIdBySkn" resultType="java.lang.Integer" | 344 | <select id="selectProductIdBySkn" resultType="java.lang.Integer" |
331 | parameterType="java.lang.Integer" timeout="20000"> | 345 | parameterType="java.lang.Integer" timeout="20000"> |
332 | SELECT id FROM product where | 346 | SELECT id FROM product where |
333 | erp_product_id = | 347 | erp_product_id = |
334 | #{productSkn,jdbcType=INTEGER} | 348 | #{productSkn,jdbcType=INTEGER} |
335 | </select> | 349 | </select> |
350 | + | ||
336 | <select id="selectSknByProductId" resultType="java.lang.Integer" | 351 | <select id="selectSknByProductId" resultType="java.lang.Integer" |
337 | parameterType="java.lang.Integer" timeout="20000"> | 352 | parameterType="java.lang.Integer" timeout="20000"> |
338 | SELECT erp_product_id FROM product where | 353 | SELECT erp_product_id FROM product where |
339 | id = | 354 | id = |
340 | #{id,jdbcType=INTEGER} | 355 | #{id,jdbcType=INTEGER} |
341 | </select> | 356 | </select> |
357 | + | ||
342 | <select id="selectPageLists" resultMap="BaseResultMap" timeout="20000"> | 358 | <select id="selectPageLists" resultMap="BaseResultMap" timeout="20000"> |
343 | select | 359 | select |
344 | <include refid="Base_Column_List"/> | 360 | <include refid="Base_Column_List"/> |
345 | from product limit #{offset},#{pageSize} | 361 | from product limit #{offset},#{pageSize} |
346 | </select> | 362 | </select> |
347 | - <select id="selectAll" resultMap="BaseResultMap" timeout="20000"> | ||
348 | - select | ||
349 | - <include refid="Base_Column_List"/> | ||
350 | - from product | ||
351 | - </select> | 363 | + |
352 | <select id="selectBySkns" resultMap="BaseResultMap"> | 364 | <select id="selectBySkns" resultMap="BaseResultMap"> |
353 | Select | 365 | Select |
354 | <include refid="Base_Column_List"/> | 366 | <include refid="Base_Column_List"/> |
@@ -358,6 +370,7 @@ | @@ -358,6 +370,7 @@ | ||
358 | #{item} | 370 | #{item} |
359 | </foreach> | 371 | </foreach> |
360 | </select> | 372 | </select> |
373 | + | ||
361 | <select id="selectListByIds" resultMap="BaseResultMap"> | 374 | <select id="selectListByIds" resultMap="BaseResultMap"> |
362 | select | 375 | select |
363 | <include refid="Base_Column_List"/> | 376 | <include refid="Base_Column_List"/> |
@@ -367,4 +380,5 @@ | @@ -367,4 +380,5 @@ | ||
367 | #{item} | 380 | #{item} |
368 | </foreach> | 381 | </foreach> |
369 | </select> | 382 | </select> |
383 | + | ||
370 | </mapper> | 384 | </mapper> |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | <mapper namespace="com.yoho.search.dal.ProductPriceMapper"> | 3 | <mapper namespace="com.yoho.search.dal.ProductPriceMapper"> |
4 | + | ||
4 | <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ProductPrice"> | 5 | <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ProductPrice"> |
5 | <id column="product_id" property="productId" jdbcType="INTEGER" /> | 6 | <id column="product_id" property="productId" jdbcType="INTEGER" /> |
6 | <result column="market_price" property="marketPrice" jdbcType="DECIMAL" /> | 7 | <result column="market_price" property="marketPrice" jdbcType="DECIMAL" /> |
7 | <result column="sales_price" property="salesPrice" jdbcType="DECIMAL" /> | 8 | <result column="sales_price" property="salesPrice" jdbcType="DECIMAL" /> |
8 | - <result column="purchase_price" property="purchasePrice" | ||
9 | - jdbcType="DECIMAL" /> | ||
10 | - <result column="special_price" property="specialPrice" | ||
11 | - jdbcType="DECIMAL" /> | 9 | + <result column="purchase_price" property="purchasePrice" jdbcType="DECIMAL" /> |
10 | + <result column="special_price" property="specialPrice" jdbcType="DECIMAL" /> | ||
12 | <result column="yoho_coin_num" property="yohoCoinNum" jdbcType="INTEGER" /> | 11 | <result column="yoho_coin_num" property="yohoCoinNum" jdbcType="INTEGER" /> |
13 | <result column="purchase_num" property="purchaseNum" jdbcType="DECIMAL" /> | 12 | <result column="purchase_num" property="purchaseNum" jdbcType="DECIMAL" /> |
14 | - <result column="purchase_cost" property="purchaseCost" | ||
15 | - jdbcType="DECIMAL" /> | 13 | + <result column="purchase_cost" property="purchaseCost" jdbcType="DECIMAL" /> |
16 | <result column="tariff" property="tariff" jdbcType="DECIMAL" /> | 14 | <result column="tariff" property="tariff" jdbcType="DECIMAL" /> |
17 | - <result column="vip_discount_type" property="vipDiscountType" | ||
18 | - jdbcType="INTEGER" /> | 15 | + <result column="vip_discount_type" property="vipDiscountType" jdbcType="INTEGER" /> |
19 | <result column="vip_discount" property="vipDiscount" jdbcType="DECIMAL" /> | 16 | <result column="vip_discount" property="vipDiscount" jdbcType="DECIMAL" /> |
20 | <result column="vip_price" property="vipPrice" jdbcType="DECIMAL" /> | 17 | <result column="vip_price" property="vipPrice" jdbcType="DECIMAL" /> |
21 | <result column="vip1_price" property="vip1Price" jdbcType="DECIMAL" /> | 18 | <result column="vip1_price" property="vip1Price" jdbcType="DECIMAL" /> |
@@ -25,31 +22,36 @@ | @@ -25,31 +22,36 @@ | ||
25 | <result column="product_skn" property="productSkn" jdbcType="INTEGER" /> | 22 | <result column="product_skn" property="productSkn" jdbcType="INTEGER" /> |
26 | <result column="update_time" property="updateTime" jdbcType="INTEGER" /> | 23 | <result column="update_time" property="updateTime" jdbcType="INTEGER" /> |
27 | <result column="student_coin_rate" property="studentCoinRate" jdbcType="DECIMAL" /> | 24 | <result column="student_coin_rate" property="studentCoinRate" jdbcType="DECIMAL" /> |
25 | + <result column="lastReducePriceTime" property="lastReducePriceTime" jdbcType="INTEGER" /> | ||
28 | </resultMap> | 26 | </resultMap> |
29 | - <sql id="Base_Column_List"> | 27 | + |
28 | + <sql id="Base_Column_List"> | ||
30 | product_id, market_price, sales_price, purchase_price, special_price, | 29 | product_id, market_price, sales_price, purchase_price, special_price, |
31 | yoho_coin_num, | 30 | yoho_coin_num, |
32 | purchase_num, purchase_cost, tariff, vip_discount_type, vip_discount, vip_price, | 31 | purchase_num, purchase_cost, tariff, vip_discount_type, vip_discount, vip_price, |
33 | - vip1_price, vip2_price, vip3_price,student_price, product_skn, update_time, student_coin_rate | 32 | + vip1_price, vip2_price, vip3_price,student_price, product_skn, update_time, student_coin_rate,lastReducePriceTime |
34 | </sql> | 33 | </sql> |
35 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" | 34 | + |
35 | + <select id="selectByPrimaryKey" resultMap="BaseResultMap" | ||
36 | parameterType="java.lang.Integer" timeout="20000"> | 36 | parameterType="java.lang.Integer" timeout="20000"> |
37 | select | 37 | select |
38 | <include refid="Base_Column_List" /> | 38 | <include refid="Base_Column_List" /> |
39 | from product_price | 39 | from product_price |
40 | where product_id = #{productId,jdbcType=INTEGER} | 40 | where product_id = #{productId,jdbcType=INTEGER} |
41 | </select> | 41 | </select> |
42 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" timeout="20000"> | 42 | + |
43 | + <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" timeout="20000"> | ||
43 | delete from product_price | 44 | delete from product_price |
44 | where product_id = #{productId,jdbcType=INTEGER} | 45 | where product_id = #{productId,jdbcType=INTEGER} |
45 | </delete> | 46 | </delete> |
46 | - <insert id="insert" parameterType="com.yoho.search.dal.model.ProductPrice" timeout="20000"> | 47 | + |
48 | + <insert id="insert" parameterType="com.yoho.search.dal.model.ProductPrice" timeout="20000"> | ||
47 | insert ignore into product_price (product_id, market_price, sales_price, | 49 | insert ignore into product_price (product_id, market_price, sales_price, |
48 | purchase_price, special_price, yoho_coin_num, | 50 | purchase_price, special_price, yoho_coin_num, |
49 | purchase_num, purchase_cost, tariff, | 51 | purchase_num, purchase_cost, tariff, |
50 | vip_discount_type, vip_discount, vip_price, | 52 | vip_discount_type, vip_discount, vip_price, |
51 | vip1_price, vip2_price, vip3_price,student_price, | 53 | vip1_price, vip2_price, vip3_price,student_price, |
52 | - product_skn, update_time, student_coin_rate) | 54 | + product_skn, update_time, student_coin_rate,lastReducePriceTime) |
53 | values (#{productId,jdbcType=INTEGER}, #{marketPrice,jdbcType=DECIMAL}, | 55 | values (#{productId,jdbcType=INTEGER}, #{marketPrice,jdbcType=DECIMAL}, |
54 | #{salesPrice,jdbcType=DECIMAL}, | 56 | #{salesPrice,jdbcType=DECIMAL}, |
55 | #{purchasePrice,jdbcType=DECIMAL}, #{specialPrice,jdbcType=DECIMAL}, #{yohoCoinNum,jdbcType=INTEGER}, | 57 | #{purchasePrice,jdbcType=DECIMAL}, #{specialPrice,jdbcType=DECIMAL}, #{yohoCoinNum,jdbcType=INTEGER}, |
@@ -58,218 +60,82 @@ | @@ -58,218 +60,82 @@ | ||
58 | #{vipDiscountType,jdbcType=INTEGER}, #{vipDiscount,jdbcType=DECIMAL}, #{vipPrice,jdbcType=DECIMAL}, | 60 | #{vipDiscountType,jdbcType=INTEGER}, #{vipDiscount,jdbcType=DECIMAL}, #{vipPrice,jdbcType=DECIMAL}, |
59 | #{vip1Price,jdbcType=DECIMAL}, #{vip2Price,jdbcType=DECIMAL}, | 61 | #{vip1Price,jdbcType=DECIMAL}, #{vip2Price,jdbcType=DECIMAL}, |
60 | #{vip3Price,jdbcType=DECIMAL},#{studentPrice,jdbcType=DECIMAL}, | 62 | #{vip3Price,jdbcType=DECIMAL},#{studentPrice,jdbcType=DECIMAL}, |
61 | - #{productSkn,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER} ,#{studentCoinRate,jdbcType=DECIMAL}) | 63 | + #{productSkn,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER} ,#{studentCoinRate,jdbcType=DECIMAL},#{lastReducePriceTime,jdbcType=INTEGER}) |
62 | </insert> | 64 | </insert> |
63 | - <insert id="insertSelective" parameterType="com.yoho.search.dal.model.ProductPrice" timeout="20000"> | ||
64 | - insert ignore into product_price | ||
65 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
66 | - <if test="productId != null"> | ||
67 | - product_id, | ||
68 | - </if> | ||
69 | - <if test="marketPrice != null"> | ||
70 | - market_price, | ||
71 | - </if> | ||
72 | - <if test="salesPrice != null"> | ||
73 | - sales_price, | ||
74 | - </if> | ||
75 | - <if test="purchasePrice != null"> | ||
76 | - purchase_price, | ||
77 | - </if> | ||
78 | - <if test="specialPrice != null"> | ||
79 | - special_price, | ||
80 | - </if> | ||
81 | - <if test="yohoCoinNum != null"> | ||
82 | - yoho_coin_num, | ||
83 | - </if> | ||
84 | - <if test="purchaseNum != null"> | ||
85 | - purchase_num, | ||
86 | - </if> | ||
87 | - <if test="purchaseCost != null"> | ||
88 | - purchase_cost, | ||
89 | - </if> | ||
90 | - <if test="tariff != null"> | ||
91 | - tariff, | ||
92 | - </if> | ||
93 | - <if test="vipDiscountType != null"> | ||
94 | - vip_discount_type, | ||
95 | - </if> | ||
96 | - <if test="vipDiscount != null"> | ||
97 | - vip_discount, | ||
98 | - </if> | ||
99 | - <if test="vipPrice != null"> | ||
100 | - vip_price, | ||
101 | - </if> | ||
102 | - <if test="vip1Price != null"> | ||
103 | - vip1_price, | ||
104 | - </if> | ||
105 | - <if test="vip2Price != null"> | ||
106 | - vip2_price, | ||
107 | - </if> | ||
108 | - <if test="vip3Price != null"> | ||
109 | - vip3_price, | ||
110 | - </if> | ||
111 | - <if test="studentPrice != null"> | ||
112 | - student_price, | ||
113 | - </if> | ||
114 | - <if test="productSkn != null"> | ||
115 | - product_skn, | ||
116 | - </if> | ||
117 | - <if test="updateTime != null"> | ||
118 | - update_time, | ||
119 | - </if> | ||
120 | - <if test="studentCoinRate != null"> | ||
121 | - student_coin_rate, | ||
122 | - </if> | ||
123 | - </trim> | ||
124 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
125 | - <if test="productId != null"> | ||
126 | - #{productId,jdbcType=INTEGER}, | ||
127 | - </if> | ||
128 | - <if test="marketPrice != null"> | ||
129 | - #{marketPrice,jdbcType=DECIMAL}, | ||
130 | - </if> | ||
131 | - <if test="salesPrice != null"> | ||
132 | - #{salesPrice,jdbcType=DECIMAL}, | ||
133 | - </if> | ||
134 | - <if test="purchasePrice != null"> | ||
135 | - #{purchasePrice,jdbcType=DECIMAL}, | ||
136 | - </if> | ||
137 | - <if test="specialPrice != null"> | ||
138 | - #{specialPrice,jdbcType=DECIMAL}, | ||
139 | - </if> | ||
140 | - <if test="yohoCoinNum != null"> | ||
141 | - #{yohoCoinNum,jdbcType=INTEGER}, | ||
142 | - </if> | ||
143 | - <if test="purchaseNum != null"> | ||
144 | - #{purchaseNum,jdbcType=DECIMAL}, | ||
145 | - </if> | ||
146 | - <if test="purchaseCost != null"> | ||
147 | - #{purchaseCost,jdbcType=DECIMAL}, | ||
148 | - </if> | ||
149 | - <if test="tariff != null"> | ||
150 | - #{tariff,jdbcType=DECIMAL}, | ||
151 | - </if> | ||
152 | - <if test="vipDiscountType != null"> | ||
153 | - #{vipDiscountType,jdbcType=INTEGER}, | ||
154 | - </if> | ||
155 | - <if test="vipDiscount != null"> | ||
156 | - #{vipDiscount,jdbcType=DECIMAL}, | ||
157 | - </if> | ||
158 | - <if test="vipPrice != null"> | ||
159 | - #{vipPrice,jdbcType=DECIMAL}, | ||
160 | - </if> | ||
161 | - <if test="vip1Price != null"> | ||
162 | - #{vip1Price,jdbcType=DECIMAL}, | ||
163 | - </if> | ||
164 | - <if test="vip2Price != null"> | ||
165 | - #{vip2Price,jdbcType=DECIMAL}, | ||
166 | - </if> | ||
167 | - <if test="vip3Price != null"> | ||
168 | - #{vip3Price,jdbcType=DECIMAL}, | ||
169 | - </if> | ||
170 | - <if test="studentPrice != null"> | ||
171 | - #{studentPrice,jdbcType=DECIMAL}, | ||
172 | - </if> | ||
173 | - <if test="productSkn != null"> | ||
174 | - #{productSkn,jdbcType=INTEGER}, | ||
175 | - </if> | ||
176 | - <if test="updateTime != null"> | ||
177 | - #{updateTime,jdbcType=INTEGER}, | ||
178 | - </if> | ||
179 | - <if test="studentCoinRate != null"> | ||
180 | - #{studentCoinRate,jdbcType=DECIMAL}, | ||
181 | - </if> | ||
182 | - </trim> | ||
183 | - </insert> | ||
184 | - <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.ProductPrice" timeout="20000"> | ||
185 | - update product_price | ||
186 | - <set> | ||
187 | - <if test="marketPrice != null"> | ||
188 | - market_price = #{marketPrice,jdbcType=DECIMAL}, | ||
189 | - </if> | ||
190 | - <if test="salesPrice != null"> | ||
191 | - sales_price = #{salesPrice,jdbcType=DECIMAL}, | ||
192 | - </if> | ||
193 | - <if test="purchasePrice != null"> | ||
194 | - purchase_price = #{purchasePrice,jdbcType=DECIMAL}, | ||
195 | - </if> | ||
196 | - <if test="specialPrice != null"> | ||
197 | - special_price = #{specialPrice,jdbcType=DECIMAL}, | ||
198 | - </if> | ||
199 | - <if test="yohoCoinNum != null"> | ||
200 | - yoho_coin_num = #{yohoCoinNum,jdbcType=INTEGER}, | ||
201 | - </if> | ||
202 | - <if test="purchaseNum != null"> | ||
203 | - purchase_num = #{purchaseNum,jdbcType=DECIMAL}, | ||
204 | - </if> | ||
205 | - <if test="purchaseCost != null"> | ||
206 | - purchase_cost = #{purchaseCost,jdbcType=DECIMAL}, | ||
207 | - </if> | ||
208 | - <if test="tariff != null"> | ||
209 | - tariff = #{tariff,jdbcType=DECIMAL}, | ||
210 | - </if> | ||
211 | - <if test="vipDiscountType != null"> | ||
212 | - vip_discount_type = #{vipDiscountType,jdbcType=INTEGER}, | ||
213 | - </if> | ||
214 | - <if test="vipDiscount != null"> | ||
215 | - vip_discount = #{vipDiscount,jdbcType=DECIMAL}, | ||
216 | - </if> | ||
217 | - <if test="vipPrice != null"> | ||
218 | - vip_price = #{vipPrice,jdbcType=DECIMAL}, | ||
219 | - </if> | ||
220 | - <if test="vip1Price != null"> | ||
221 | - vip1_price = #{vip1Price,jdbcType=DECIMAL}, | ||
222 | - </if> | ||
223 | - <if test="vip2Price != null"> | ||
224 | - vip2_price = #{vip2Price,jdbcType=DECIMAL}, | ||
225 | - </if> | ||
226 | - <if test="vip3Price != null"> | ||
227 | - vip3_price = #{vip3Price,jdbcType=DECIMAL}, | ||
228 | - </if> | ||
229 | - student_price = #{studentPrice,jdbcType=DECIMAL}, | ||
230 | - <if test="productSkn != null"> | ||
231 | - product_skn = #{productSkn,jdbcType=INTEGER}, | ||
232 | - </if> | ||
233 | - <if test="updateTime != null"> | ||
234 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
235 | - </if> | ||
236 | - <if test="studentCoinRate != null"> | ||
237 | - student_coin_rate = #{studentCoinRate,jdbcType=DECIMAL}, | ||
238 | - </if> | ||
239 | - </set> | ||
240 | - where product_id = #{productId,jdbcType=INTEGER} | ||
241 | - </update> | ||
242 | - <update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.ProductPrice" timeout="20000"> | ||
243 | - update product_price | ||
244 | - set market_price = #{marketPrice,jdbcType=DECIMAL}, | ||
245 | - sales_price = #{salesPrice,jdbcType=DECIMAL}, | ||
246 | - purchase_price = #{purchasePrice,jdbcType=DECIMAL}, | ||
247 | - special_price = #{specialPrice,jdbcType=DECIMAL}, | ||
248 | - yoho_coin_num = #{yohoCoinNum,jdbcType=INTEGER}, | ||
249 | - purchase_num = #{purchaseNum,jdbcType=DECIMAL}, | ||
250 | - purchase_cost = #{purchaseCost,jdbcType=DECIMAL}, | ||
251 | - tariff = #{tariff,jdbcType=DECIMAL}, | ||
252 | - vip_discount_type = #{vipDiscountType,jdbcType=INTEGER}, | ||
253 | - vip_discount = #{vipDiscount,jdbcType=DECIMAL}, | ||
254 | - vip_price = #{vipPrice,jdbcType=DECIMAL}, | ||
255 | - vip1_price = #{vip1Price,jdbcType=DECIMAL}, | ||
256 | - vip2_price = #{vip2Price,jdbcType=DECIMAL},YH | ||
257 | - vip3_price = #{vip3Price,jdbcType=DECIMAL}, | ||
258 | - student_price = #{studentPrice,jdbcType=DECIMAL}, | ||
259 | - product_skn = #{productSkn,jdbcType=INTEGER}, | ||
260 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
261 | - student_coin_rate = #{studentCoinRate,jdbcType=DECIMAL} | ||
262 | - where product_id = #{productId,jdbcType=INTEGER} | ||
263 | - </update> | ||
264 | - <select id="selectCount" resultType="java.lang.Integer" timeout="20000"> | 65 | + |
66 | + <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.ProductPrice" timeout="20000"> | ||
67 | + update product_price | ||
68 | + <set> | ||
69 | + <if test="marketPrice != null"> | ||
70 | + market_price = #{marketPrice,jdbcType=DECIMAL}, | ||
71 | + </if> | ||
72 | + <if test="salesPrice != null"> | ||
73 | + sales_price = #{salesPrice,jdbcType=DECIMAL}, | ||
74 | + </if> | ||
75 | + <if test="purchasePrice != null"> | ||
76 | + purchase_price = #{purchasePrice,jdbcType=DECIMAL}, | ||
77 | + </if> | ||
78 | + <if test="specialPrice != null"> | ||
79 | + special_price = #{specialPrice,jdbcType=DECIMAL}, | ||
80 | + </if> | ||
81 | + <if test="yohoCoinNum != null"> | ||
82 | + yoho_coin_num = #{yohoCoinNum,jdbcType=INTEGER}, | ||
83 | + </if> | ||
84 | + <if test="purchaseNum != null"> | ||
85 | + purchase_num = #{purchaseNum,jdbcType=DECIMAL}, | ||
86 | + </if> | ||
87 | + <if test="purchaseCost != null"> | ||
88 | + purchase_cost = #{purchaseCost,jdbcType=DECIMAL}, | ||
89 | + </if> | ||
90 | + <if test="tariff != null"> | ||
91 | + tariff = #{tariff,jdbcType=DECIMAL}, | ||
92 | + </if> | ||
93 | + <if test="vipDiscountType != null"> | ||
94 | + vip_discount_type = #{vipDiscountType,jdbcType=INTEGER}, | ||
95 | + </if> | ||
96 | + <if test="vipDiscount != null"> | ||
97 | + vip_discount = #{vipDiscount,jdbcType=DECIMAL}, | ||
98 | + </if> | ||
99 | + <if test="vipPrice != null"> | ||
100 | + vip_price = #{vipPrice,jdbcType=DECIMAL}, | ||
101 | + </if> | ||
102 | + <if test="vip1Price != null"> | ||
103 | + vip1_price = #{vip1Price,jdbcType=DECIMAL}, | ||
104 | + </if> | ||
105 | + <if test="vip2Price != null"> | ||
106 | + vip2_price = #{vip2Price,jdbcType=DECIMAL}, | ||
107 | + </if> | ||
108 | + <if test="vip3Price != null"> | ||
109 | + vip3_price = #{vip3Price,jdbcType=DECIMAL}, | ||
110 | + </if> | ||
111 | + student_price = #{studentPrice,jdbcType=DECIMAL}, | ||
112 | + <if test="productSkn != null"> | ||
113 | + product_skn = #{productSkn,jdbcType=INTEGER}, | ||
114 | + </if> | ||
115 | + <if test="updateTime != null"> | ||
116 | + update_time = #{updateTime,jdbcType=INTEGER}, | ||
117 | + </if> | ||
118 | + <if test="studentCoinRate != null"> | ||
119 | + student_coin_rate = #{studentCoinRate,jdbcType=DECIMAL}, | ||
120 | + </if> | ||
121 | + <if test="lastReducePriceTime != null"> | ||
122 | + lastReducePriceTime = #{lastReducePriceTime,jdbcType=INTEGER}, | ||
123 | + </if> | ||
124 | + </set> | ||
125 | + where product_id = #{productId,jdbcType=INTEGER} | ||
126 | + </update> | ||
127 | + | ||
128 | + <select id="selectCount" resultType="java.lang.Integer" timeout="20000"> | ||
265 | SELECT count(1) FROM product_price | 129 | SELECT count(1) FROM product_price |
266 | </select> | 130 | </select> |
267 | - <select id="selectPageLists" resultMap="BaseResultMap" timeout="20000"> | 131 | + |
132 | + <select id="selectPageLists" resultMap="BaseResultMap" timeout="20000"> | ||
268 | select | 133 | select |
269 | <include refid="Base_Column_List" /> | 134 | <include refid="Base_Column_List" /> |
270 | from product_price limit #{offset},#{pageSize} | 135 | from product_price limit #{offset},#{pageSize} |
271 | </select> | 136 | </select> |
272 | - <select id="selectByIds" resultMap="BaseResultMap"> | 137 | + |
138 | + <select id="selectByIds" resultMap="BaseResultMap"> | ||
273 | select | 139 | select |
274 | <include refid="Base_Column_List" /> | 140 | <include refid="Base_Column_List" /> |
275 | from product_price where product_id in | 141 | from product_price where product_id in |
@@ -1055,6 +1055,12 @@ | @@ -1055,6 +1055,12 @@ | ||
1055 | }, | 1055 | }, |
1056 | "productProfitValue": { | 1056 | "productProfitValue": { |
1057 | "type":"long" | 1057 | "type":"long" |
1058 | + }, | ||
1059 | + "lastReducePriceTime": { | ||
1060 | + "type": "long" | ||
1061 | + }, | ||
1062 | + "couponLimitStatus": { | ||
1063 | + "type":"long" | ||
1058 | } | 1064 | } |
1059 | } | 1065 | } |
1060 | } | 1066 | } |
@@ -210,6 +210,8 @@ public class ProductIndexService { | @@ -210,6 +210,8 @@ public class ProductIndexService { | ||
210 | map.put(ProductIndexEsField.giveValue, productIndexBO.getGiveValue()); | 210 | map.put(ProductIndexEsField.giveValue, productIndexBO.getGiveValue()); |
211 | map.put(ProductIndexEsField.profitValue, productIndexBO.getProfitValue()); | 211 | map.put(ProductIndexEsField.profitValue, productIndexBO.getProfitValue()); |
212 | map.put(ProductIndexEsField.promotionTitle, productIndexBO.getPromotionTitles()); | 212 | map.put(ProductIndexEsField.promotionTitle, productIndexBO.getPromotionTitles()); |
213 | + map.put(ProductIndexEsField.lastReducePriceTime, productIndexBO.getLastReducePriceTime()); | ||
214 | + map.put(ProductIndexEsField.couponLimitStatus, productIndexBO.getCouponLimitStatus()); | ||
213 | return map; | 215 | return map; |
214 | } | 216 | } |
215 | 217 |
@@ -62,6 +62,8 @@ public class ProductIBO implements Serializable { | @@ -62,6 +62,8 @@ public class ProductIBO implements Serializable { | ||
62 | private String isInstalment; | 62 | private String isInstalment; |
63 | private String isSeckill; | 63 | private String isSeckill; |
64 | private String marketPhrase; | 64 | private String marketPhrase; |
65 | + private Integer couponLimitStatus; | ||
66 | + | ||
65 | 67 | ||
66 | // inner join brand | 68 | // inner join brand |
67 | private String brandNameCn; | 69 | private String brandNameCn; |
@@ -689,4 +691,11 @@ public class ProductIBO implements Serializable { | @@ -689,4 +691,11 @@ public class ProductIBO implements Serializable { | ||
689 | this.isPhraseExist = isPhraseExist; | 691 | this.isPhraseExist = isPhraseExist; |
690 | } | 692 | } |
691 | 693 | ||
694 | + public Integer getCouponLimitStatus() { | ||
695 | + return couponLimitStatus; | ||
696 | + } | ||
697 | + | ||
698 | + public void setCouponLimitStatus(Integer couponLimitStatus) { | ||
699 | + this.couponLimitStatus = couponLimitStatus; | ||
700 | + } | ||
692 | } | 701 | } |
@@ -126,6 +126,17 @@ public class ProductIndexBO extends ProductIBO implements Serializable { | @@ -126,6 +126,17 @@ public class ProductIndexBO extends ProductIBO implements Serializable { | ||
126 | private Integer giveValue; | 126 | private Integer giveValue; |
127 | private Integer profitValue; | 127 | private Integer profitValue; |
128 | 128 | ||
129 | + // from product_price | ||
130 | + private Integer lastReducePriceTime; | ||
131 | + | ||
132 | + public Integer getLastReducePriceTime() { | ||
133 | + return lastReducePriceTime; | ||
134 | + } | ||
135 | + | ||
136 | + public void setLastReducePriceTime(Integer lastReducePriceTime) { | ||
137 | + this.lastReducePriceTime = lastReducePriceTime; | ||
138 | + } | ||
139 | + | ||
129 | public Integer getActiveValue() { | 140 | public Integer getActiveValue() { |
130 | return activeValue; | 141 | return activeValue; |
131 | } | 142 | } |
@@ -18,6 +18,7 @@ public class ProductPriceBO { | @@ -18,6 +18,7 @@ public class ProductPriceBO { | ||
18 | private BigDecimal studentPrice; | 18 | private BigDecimal studentPrice; |
19 | private BigDecimal studentCoinRate; | 19 | private BigDecimal studentCoinRate; |
20 | private Integer updateTime; | 20 | private Integer updateTime; |
21 | + private Integer lastReducePriceTime; | ||
21 | 22 | ||
22 | // others | 23 | // others |
23 | private String isDiscount; | 24 | private String isDiscount; |
@@ -42,9 +43,18 @@ public class ProductPriceBO { | @@ -42,9 +43,18 @@ public class ProductPriceBO { | ||
42 | this.studentPrice = productPrice.getStudentPrice(); | 43 | this.studentPrice = productPrice.getStudentPrice(); |
43 | this.studentCoinRate = productPrice.getStudentCoinRate(); | 44 | this.studentCoinRate = productPrice.getStudentCoinRate(); |
44 | this.updateTime = productPrice.getUpdateTime(); | 45 | this.updateTime = productPrice.getUpdateTime(); |
46 | + this.lastReducePriceTime = productPrice.getLastReducePriceTime(); | ||
45 | } | 47 | } |
46 | 48 | ||
47 | - public Integer getProductId() { | 49 | + public Integer getLastReducePriceTime() { |
50 | + return lastReducePriceTime; | ||
51 | + } | ||
52 | + | ||
53 | + public void setLastReducePriceTime(Integer lastReducePriceTime) { | ||
54 | + this.lastReducePriceTime = lastReducePriceTime; | ||
55 | + } | ||
56 | + | ||
57 | + public Integer getProductId() { | ||
48 | return productId; | 58 | return productId; |
49 | } | 59 | } |
50 | 60 |
@@ -164,6 +164,7 @@ public class ProductILogicService { | @@ -164,6 +164,7 @@ public class ProductILogicService { | ||
164 | productIBO.setSellChannels(p.getSellChannels()); | 164 | productIBO.setSellChannels(p.getSellChannels()); |
165 | productIBO.setAgeLevel(p.getAgeLevel()); | 165 | productIBO.setAgeLevel(p.getAgeLevel()); |
166 | productIBO.setAppType(p.getAppType()); | 166 | productIBO.setAppType(p.getAppType()); |
167 | + productIBO.setCouponLimitStatus(p.getCouponLimitStatus()); | ||
167 | //品牌 | 168 | //品牌 |
168 | this.buildBrand(brandMap,p,productIBO); | 169 | this.buildBrand(brandMap,p,productIBO); |
169 | //品类 | 170 | //品类 |
@@ -72,6 +72,9 @@ public class ProductPriceBuilder implements ViewBuilder { | @@ -72,6 +72,9 @@ public class ProductPriceBuilder implements ViewBuilder { | ||
72 | //设置价格更新时间 | 72 | //设置价格更新时间 |
73 | pi.setPriceUpdateTime(productPriceBO.getUpdateTime()); | 73 | pi.setPriceUpdateTime(productPriceBO.getUpdateTime()); |
74 | 74 | ||
75 | + //设置最后一次降价时间 | ||
76 | + pi.setLastReducePriceTime(productPriceBO.getLastReducePriceTime()); | ||
77 | + | ||
75 | // 计算isNew(规则:首次上架7天内展示且折扣率大于等于88折) | 78 | // 计算isNew(规则:首次上架7天内展示且折扣率大于等于88折) |
76 | pi.setIsnew("N"); | 79 | pi.setIsnew("N"); |
77 | if (this.isNew(pi.getFirstShelveTime(), pi.getMarketPrice(), pi.getSalesPrice())) { | 80 | if (this.isNew(pi.getFirstShelveTime(), pi.getMarketPrice(), pi.getSalesPrice())) { |
-
Please register or login to post a comment