Authored by mali

促销显示在订单详情

@@ -41,7 +41,10 @@ public class BuyerOrderGoods implements Serializable { @@ -41,7 +41,10 @@ public class BuyerOrderGoods implements Serializable {
41 private BigDecimal cutTariffAmount; 41 private BigDecimal cutTariffAmount;
42 42
43 private BigDecimal depositAmount; 43 private BigDecimal depositAmount;
44 - 44 +
  45 + @Getter@Setter
  46 + private BigDecimal cutPromotionAmount;
  47 +
45 public Integer getId() { 48 public Integer getId() {
46 return id; 49 return id;
47 } 50 }
@@ -13,10 +13,11 @@ @@ -13,10 +13,11 @@
13 <result column="tariff_amount" jdbcType="DECIMAL" property="tariffAmount" /> 13 <result column="tariff_amount" jdbcType="DECIMAL" property="tariffAmount" />
14 <result column="cut_tariff_amount" jdbcType="DECIMAL" property="cutTariffAmount" /> 14 <result column="cut_tariff_amount" jdbcType="DECIMAL" property="cutTariffAmount" />
15 <result column="deposit_amount" jdbcType="DECIMAL" property="depositAmount" /> 15 <result column="deposit_amount" jdbcType="DECIMAL" property="depositAmount" />
  16 + <result column="cut_promotion_amount" jdbcType="DECIMAL" property="cutPromotionAmount" />
16 </resultMap> 17 </resultMap>
17 18
18 <sql id="Base_Column_List"> 19 <sql id="Base_Column_List">
19 - id, uid, order_code, skup, goods_price, goods_amount, coupon_cut_amount,activity_cut_amount, tariff_amount, cut_tariff_amount, deposit_amount 20 + id, uid, order_code, skup, goods_price, goods_amount, coupon_cut_amount,activity_cut_amount, tariff_amount, cut_tariff_amount, deposit_amount,cut_promotion_amount
20 </sql> 21 </sql>
21 22
22 <select id="selectById" resultMap="BaseResultMap"> 23 <select id="selectById" resultMap="BaseResultMap">
@@ -25,4 +25,12 @@ public class BuyerOrderGoodsService { @@ -25,4 +25,12 @@ public class BuyerOrderGoodsService {
25 25
26 return goods.getTariffAmount().subtract(goods.getCutTariffAmount()).doubleValue(); 26 return goods.getTariffAmount().subtract(goods.getCutTariffAmount()).doubleValue();
27 } 27 }
  28 +
  29 + public double getCutPromotionAmountStr(BuyerOrderGoods goods) {
  30 + double result = 0.00;
  31 + if (null == goods.getCutPromotionAmount()) {
  32 + return result;
  33 + }
  34 + return goods.getCutPromotionAmount().doubleValue();
  35 + }
28 } 36 }
@@ -2751,6 +2751,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon @@ -2751,6 +2751,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon
2751 resp.setDepositAmount(goods.getDepositAmount() == null ? "0.00" : String.format("%.2f", goods.getDepositAmount().doubleValue())); 2751 resp.setDepositAmount(goods.getDepositAmount() == null ? "0.00" : String.format("%.2f", goods.getDepositAmount().doubleValue()));
2752 resp.setActivityCutAmount(goods.getActivityCutAmount() == null ? "-" : String.format("%.2f", goods.getActivityCutAmount().doubleValue())); 2752 resp.setActivityCutAmount(goods.getActivityCutAmount() == null ? "-" : String.format("%.2f", goods.getActivityCutAmount().doubleValue()));
2753 resp.setTariffAmount(buyerOrderGoodsService.getTariffAmount(goods)); 2753 resp.setTariffAmount(buyerOrderGoodsService.getTariffAmount(goods));
  2754 + resp.setCutPromotionAmount(buyerOrderGoodsService.getCutPromotionAmountStr(goods));
2754 SellerOrderMeta sellerMeta = sellerOrderMetaMapper.selectBySkupAndKey(skup, SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS); 2755 SellerOrderMeta sellerMeta = sellerOrderMetaMapper.selectBySkupAndKey(skup, SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS);
2755 if(sellerMeta!=null){ 2756 if(sellerMeta!=null){
2756 JSONObject sellerMetaValue = JSONObject.parseObject(sellerMeta.getMetaValue()); 2757 JSONObject sellerMetaValue = JSONObject.parseObject(sellerMeta.getMetaValue());
@@ -120,6 +120,7 @@ @@ -120,6 +120,7 @@
120 <th>税费</th> 120 <th>税费</th>
121 <th>活动优惠</th> 121 <th>活动优惠</th>
122 <th>优惠券</th> 122 <th>优惠券</th>
  123 + <th>促销金额</th>
123 <th>购买数量</th> 124 <th>购买数量</th>
124 <th>运费</th> 125 <th>运费</th>
125 <th>仓储费</th> 126 <th>仓储费</th>
@@ -139,6 +140,7 @@ @@ -139,6 +140,7 @@
139 <td><span id="tariffAmount"></span></td> 140 <td><span id="tariffAmount"></span></td>
140 <td><span id="activityCutAmount"></span></td> 141 <td><span id="activityCutAmount"></span></td>
141 <td><span id="couponCutAmount"></span></td> 142 <td><span id="couponCutAmount"></span></td>
  143 + <td><span id="cutPromotionAmount"></span></td>
142 <td><span id="productNum"></span></td> 144 <td><span id="productNum"></span></td>
143 <td><span id="shipFee"></span></td> 145 <td><span id="shipFee"></span></td>
144 <td><span id="depositAmount"></span></td> 146 <td><span id="depositAmount"></span></td>
@@ -558,6 +560,7 @@ function getOrderInfo(orderCode){ @@ -558,6 +560,7 @@ function getOrderInfo(orderCode){
558 $("#sizeName").html(result.data.sizeName); 560 $("#sizeName").html(result.data.sizeName);
559 $("#goodsPrice").html(result.data.goodsPrice); 561 $("#goodsPrice").html(result.data.goodsPrice);
560 $("#tariffAmount").html(result.data.tariffAmount); 562 $("#tariffAmount").html(result.data.tariffAmount);
  563 + $("#cutPromotionAmount").html(result.data.cutPromotionAmount);
561 if (result.data.couponCodeList) { 564 if (result.data.couponCodeList) {
562 565
563 var codeListStr = ''; 566 var codeListStr = '';