Authored by caoyan

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

... ... @@ -24,6 +24,8 @@ public class BuyerOrderGoods implements Serializable {
private BigDecimal goodsAmount;//成交价
private BigDecimal couponCutAmount;//优惠金额
public Integer getId() {
return id;
}
... ... @@ -72,6 +74,14 @@ public class BuyerOrderGoods implements Serializable {
this.goodsAmount = goodsAmount;
}
public BigDecimal getCouponCutAmount() {
return couponCutAmount;
}
public void setCouponCutAmount(BigDecimal couponCutAmount) {
this.couponCutAmount = couponCutAmount;
}
@Override
public String toString() {
return "BuyerOrderGoods{" +
... ... @@ -81,6 +91,7 @@ public class BuyerOrderGoods implements Serializable {
", skup='" + skup + '\'' +
", goodsPrice=" + goodsPrice +
", goodsAmount=" + goodsAmount +
", couponCutAmount=" + couponCutAmount +
'}';
}
}
... ...
... ... @@ -8,10 +8,11 @@
<result column="skup" property="skup" jdbcType="INTEGER" />
<result column="goods_price" property="goodsPrice" jdbcType="DECIMAL" />
<result column="goods_amount" property="goodsAmount" jdbcType="DECIMAL" />
<result column="coupon_cut_amount" property="couponCutAmount" jdbcType="DECIMAL" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, skup, goods_price, goods_amount
id, uid, order_code, skup, goods_price, goods_amount, coupon_cut_amount
</sql>
<select id="selectById" resultMap="BaseResultMap">
... ...
package com.yoho.ufo.order.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
... ... @@ -417,6 +418,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resp.setProductNum(1);
resp.setShipFee(String.format("%.2f", buyerOrder.getShipFee().doubleValue()));
resp.setAmount(String.format("%.2f", buyerOrder.getAmount().doubleValue()));
resp.setCouponCutAmount(goods.getCouponCutAmount().compareTo(BigDecimal.valueOf(0))==0 ? "-" : goods.getCouponCutAmount().toString());
resp.setPlatformReceiveGoodsAddress(appraiseAddressMapper.selectAddressByType(sellerGoods.getDepotNo()));
... ...
... ... @@ -100,6 +100,7 @@
<td><span id="colorName"></span></td>
<td><span id="sizeName"></span></td>
<td><span id="goodsPrice"></span></td>
<td><span id="couponCutAmount"></span></td>
<td><span id="productNum"></span></td>
<td><span id="shipFee"></span></td>
<td><span id="amount"></span></td>
... ... @@ -107,7 +108,7 @@
<tr>
<th colspan="2">销售价:<span id="salesPrice"></span></th>
<th colspan="2">平台费用:<span id="platformFee"></span></th>
<th colspan="2">银行转账费用:<span id="bankTransferfee"></span></th>
<th colspan="3">银行转账费用:<span id="bankTransferfee"></span></th>
<th colspan="3">卖家实际收入:<span id="sellerIncome"></span></th>
</tr>
</table>
... ... @@ -302,6 +303,7 @@ function getOrderInfo(orderCode){
$("#colorName").html(result.data.colorName);
$("#sizeName").html(result.data.sizeName);
$("#goodsPrice").html(result.data.goodsPrice);
$("#couponCutAmount").html(result.data.couponCutAmount);
$("#productNum").html(result.data.productNum);
$("#shipFee").html(result.data.shipFee);
$("#amount").html(result.data.amount);
... ...