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 | 109 | // private BigDecimal unitWeightVo; |
110 | 110 | |
111 | 111 | /** |
112 | - * 总重(克) | |
112 | + * 总数量 | |
113 | 113 | */ |
114 | 114 | @JsonSerialize(using = WeightK2JJsonSerializer.class) |
115 | 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 | 374 | public void setCheckFlag(Integer checkFlag) { |
370 | 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 | 36 | <result column="product_name" jdbcType="VARCHAR" property="productName"/> |
37 | 37 | <result column="prePrice" jdbcType="BIGINT" property="prePrice"/> |
38 | 38 | <result column="createdTime" jdbcType="TIMESTAMP" property="createdTime"/> |
39 | + <result column="maxWeight" jdbcType="BIGINT" property="maxWeight"/> | |
39 | 40 | </collection> |
40 | 41 | </resultMap> |
41 | 42 | |
... | ... | @@ -64,6 +65,7 @@ |
64 | 65 | scm.unit_amount, |
65 | 66 | scm.unit_amount as prePrice, |
66 | 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 | 69 | scm.weight, |
68 | 70 | scm.amount, |
69 | 71 | scm.type, | ... | ... |