Authored by caoyan

订单详情增加优惠券金额展示

@@ -24,6 +24,8 @@ public class BuyerOrderGoods implements Serializable { @@ -24,6 +24,8 @@ public class BuyerOrderGoods implements Serializable {
24 24
25 private BigDecimal goodsAmount;//成交价 25 private BigDecimal goodsAmount;//成交价
26 26
  27 + private BigDecimal couponCutAmount;//优惠金额
  28 +
27 public Integer getId() { 29 public Integer getId() {
28 return id; 30 return id;
29 } 31 }
@@ -72,6 +74,14 @@ public class BuyerOrderGoods implements Serializable { @@ -72,6 +74,14 @@ public class BuyerOrderGoods implements Serializable {
72 this.goodsAmount = goodsAmount; 74 this.goodsAmount = goodsAmount;
73 } 75 }
74 76
  77 + public BigDecimal getCouponCutAmount() {
  78 + return couponCutAmount;
  79 + }
  80 +
  81 + public void setCouponCutAmount(BigDecimal couponCutAmount) {
  82 + this.couponCutAmount = couponCutAmount;
  83 + }
  84 +
75 @Override 85 @Override
76 public String toString() { 86 public String toString() {
77 return "BuyerOrderGoods{" + 87 return "BuyerOrderGoods{" +
@@ -81,6 +91,7 @@ public class BuyerOrderGoods implements Serializable { @@ -81,6 +91,7 @@ public class BuyerOrderGoods implements Serializable {
81 ", skup='" + skup + '\'' + 91 ", skup='" + skup + '\'' +
82 ", goodsPrice=" + goodsPrice + 92 ", goodsPrice=" + goodsPrice +
83 ", goodsAmount=" + goodsAmount + 93 ", goodsAmount=" + goodsAmount +
  94 + ", couponCutAmount=" + couponCutAmount +
84 '}'; 95 '}';
85 } 96 }
86 } 97 }
@@ -8,10 +8,11 @@ @@ -8,10 +8,11 @@
8 <result column="skup" property="skup" jdbcType="INTEGER" /> 8 <result column="skup" property="skup" jdbcType="INTEGER" />
9 <result column="goods_price" property="goodsPrice" jdbcType="DECIMAL" /> 9 <result column="goods_price" property="goodsPrice" jdbcType="DECIMAL" />
10 <result column="goods_amount" property="goodsAmount" jdbcType="DECIMAL" /> 10 <result column="goods_amount" property="goodsAmount" jdbcType="DECIMAL" />
  11 + <result column="coupon_cut_amount" property="couponCutAmount" jdbcType="DECIMAL" />
11 </resultMap> 12 </resultMap>
12 13
13 <sql id="Base_Column_List"> 14 <sql id="Base_Column_List">
14 - id, uid, order_code, skup, goods_price, goods_amount 15 + id, uid, order_code, skup, goods_price, goods_amount, coupon_cut_amount
15 </sql> 16 </sql>
16 17
17 <select id="selectById" resultMap="BaseResultMap"> 18 <select id="selectById" resultMap="BaseResultMap">
1 package com.yoho.ufo.order.service.impl; 1 package com.yoho.ufo.order.service.impl;
2 2
  3 +import java.math.BigDecimal;
3 import java.util.ArrayList; 4 import java.util.ArrayList;
4 import java.util.Collections; 5 import java.util.Collections;
5 import java.util.List; 6 import java.util.List;
@@ -417,6 +418,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -417,6 +418,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
417 resp.setProductNum(1); 418 resp.setProductNum(1);
418 resp.setShipFee(String.format("%.2f", buyerOrder.getShipFee().doubleValue())); 419 resp.setShipFee(String.format("%.2f", buyerOrder.getShipFee().doubleValue()));
419 resp.setAmount(String.format("%.2f", buyerOrder.getAmount().doubleValue())); 420 resp.setAmount(String.format("%.2f", buyerOrder.getAmount().doubleValue()));
  421 + resp.setCouponCutAmount(goods.getCouponCutAmount().compareTo(BigDecimal.valueOf(0))==0 ? "-" : goods.getCouponCutAmount().toString());
420 422
421 resp.setPlatformReceiveGoodsAddress(appraiseAddressMapper.selectAddressByType(sellerGoods.getDepotNo())); 423 resp.setPlatformReceiveGoodsAddress(appraiseAddressMapper.selectAddressByType(sellerGoods.getDepotNo()));
422 424
@@ -100,6 +100,7 @@ @@ -100,6 +100,7 @@
100 <td><span id="colorName"></span></td> 100 <td><span id="colorName"></span></td>
101 <td><span id="sizeName"></span></td> 101 <td><span id="sizeName"></span></td>
102 <td><span id="goodsPrice"></span></td> 102 <td><span id="goodsPrice"></span></td>
  103 + <td><span id="couponCutAmount"></span></td>
103 <td><span id="productNum"></span></td> 104 <td><span id="productNum"></span></td>
104 <td><span id="shipFee"></span></td> 105 <td><span id="shipFee"></span></td>
105 <td><span id="amount"></span></td> 106 <td><span id="amount"></span></td>
@@ -107,7 +108,7 @@ @@ -107,7 +108,7 @@
107 <tr> 108 <tr>
108 <th colspan="2">销售价:<span id="salesPrice"></span></th> 109 <th colspan="2">销售价:<span id="salesPrice"></span></th>
109 <th colspan="2">平台费用:<span id="platformFee"></span></th> 110 <th colspan="2">平台费用:<span id="platformFee"></span></th>
110 - <th colspan="2">银行转账费用:<span id="bankTransferfee"></span></th> 111 + <th colspan="3">银行转账费用:<span id="bankTransferfee"></span></th>
111 <th colspan="3">卖家实际收入:<span id="sellerIncome"></span></th> 112 <th colspan="3">卖家实际收入:<span id="sellerIncome"></span></th>
112 </tr> 113 </tr>
113 </table> 114 </table>
@@ -302,6 +303,7 @@ function getOrderInfo(orderCode){ @@ -302,6 +303,7 @@ function getOrderInfo(orderCode){
302 $("#colorName").html(result.data.colorName); 303 $("#colorName").html(result.data.colorName);
303 $("#sizeName").html(result.data.sizeName); 304 $("#sizeName").html(result.data.sizeName);
304 $("#goodsPrice").html(result.data.goodsPrice); 305 $("#goodsPrice").html(result.data.goodsPrice);
  306 + $("#couponCutAmount").html(result.data.couponCutAmount);
305 $("#productNum").html(result.data.productNum); 307 $("#productNum").html(result.data.productNum);
306 $("#shipFee").html(result.data.shipFee); 308 $("#shipFee").html(result.data.shipFee);
307 $("#amount").html(result.data.amount); 309 $("#amount").html(result.data.amount);