Commit 3d4c028223f3ee2cbdffd2714a4b03ebd097a079
Merge remote-tracking branch 'origin/feature_v20240912' into feature_v20240912
Showing
2 changed files
with
16 additions
and
1 deletions
etrade-order/src/main/java/com/diligrp/etrade/order/domain/ShopCartMessageVo.java
@@ -109,10 +109,15 @@ public class ShopCartMessageVo implements Serializable { | @@ -109,10 +109,15 @@ public class ShopCartMessageVo implements Serializable { | ||
109 | // private BigDecimal unitWeightVo; | 109 | // private BigDecimal unitWeightVo; |
110 | 110 | ||
111 | /** | 111 | /** |
112 | - * 总重(克) | 112 | + * 总数量 |
113 | */ | 113 | */ |
114 | @JsonSerialize(using = WeightK2JJsonSerializer.class) | 114 | @JsonSerialize(using = WeightK2JJsonSerializer.class) |
115 | private Long weight; | 115 | private Long weight; |
116 | + /** | ||
117 | + * 库存最大总数量 | ||
118 | + */ | ||
119 | + @JsonSerialize(using = WeightK2JJsonSerializer.class) | ||
120 | + private Long maxWeight; | ||
116 | 121 | ||
117 | /** | 122 | /** |
118 | // * 总重(斤) | 123 | // * 总重(斤) |
@@ -369,4 +374,12 @@ public class ShopCartMessageVo implements Serializable { | @@ -369,4 +374,12 @@ public class ShopCartMessageVo implements Serializable { | ||
369 | public void setCheckFlag(Integer checkFlag) { | 374 | public void setCheckFlag(Integer checkFlag) { |
370 | this.checkFlag = checkFlag; | 375 | this.checkFlag = checkFlag; |
371 | } | 376 | } |
377 | + | ||
378 | + public Long getMaxWeight() { | ||
379 | + return maxWeight; | ||
380 | + } | ||
381 | + | ||
382 | + public void setMaxWeight(Long maxWeight) { | ||
383 | + this.maxWeight = maxWeight; | ||
384 | + } | ||
372 | } | 385 | } |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/shopCart/ShopCartMapper.xml
@@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
36 | <result column="product_name" jdbcType="VARCHAR" property="productName"/> | 36 | <result column="product_name" jdbcType="VARCHAR" property="productName"/> |
37 | <result column="prePrice" jdbcType="BIGINT" property="prePrice"/> | 37 | <result column="prePrice" jdbcType="BIGINT" property="prePrice"/> |
38 | <result column="createdTime" jdbcType="TIMESTAMP" property="createdTime"/> | 38 | <result column="createdTime" jdbcType="TIMESTAMP" property="createdTime"/> |
39 | + <result column="maxWeight" jdbcType="BIGINT" property="maxWeight"/> | ||
39 | </collection> | 40 | </collection> |
40 | </resultMap> | 41 | </resultMap> |
41 | 42 | ||
@@ -64,6 +65,7 @@ | @@ -64,6 +65,7 @@ | ||
64 | scm.unit_amount, | 65 | scm.unit_amount, |
65 | scm.unit_amount as prePrice, | 66 | scm.unit_amount as prePrice, |
66 | case when scm.weight > st.stock*100 then st.stock*100 else scm.weight end as weight, | 67 | case when scm.weight > st.stock*100 then st.stock*100 else scm.weight end as weight, |
68 | + st.stock*100 as maxWeight, | ||
67 | scm.weight, | 69 | scm.weight, |
68 | scm.amount, | 70 | scm.amount, |
69 | scm.type, | 71 | scm.type, |