Authored by mali

促销显示在订单详情

... ... @@ -41,7 +41,10 @@ public class BuyerOrderGoods implements Serializable {
private BigDecimal cutTariffAmount;
private BigDecimal depositAmount;
@Getter@Setter
private BigDecimal cutPromotionAmount;
public Integer getId() {
return id;
}
... ...
... ... @@ -13,10 +13,11 @@
<result column="tariff_amount" jdbcType="DECIMAL" property="tariffAmount" />
<result column="cut_tariff_amount" jdbcType="DECIMAL" property="cutTariffAmount" />
<result column="deposit_amount" jdbcType="DECIMAL" property="depositAmount" />
<result column="cut_promotion_amount" jdbcType="DECIMAL" property="cutPromotionAmount" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, skup, goods_price, goods_amount, coupon_cut_amount,activity_cut_amount, tariff_amount, cut_tariff_amount, deposit_amount
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
</sql>
<select id="selectById" resultMap="BaseResultMap">
... ...
... ... @@ -25,4 +25,12 @@ public class BuyerOrderGoodsService {
return goods.getTariffAmount().subtract(goods.getCutTariffAmount()).doubleValue();
}
public double getCutPromotionAmountStr(BuyerOrderGoods goods) {
double result = 0.00;
if (null == goods.getCutPromotionAmount()) {
return result;
}
return goods.getCutPromotionAmount().doubleValue();
}
}
... ...
... ... @@ -2751,6 +2751,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon
resp.setDepositAmount(goods.getDepositAmount() == null ? "0.00" : String.format("%.2f", goods.getDepositAmount().doubleValue()));
resp.setActivityCutAmount(goods.getActivityCutAmount() == null ? "-" : String.format("%.2f", goods.getActivityCutAmount().doubleValue()));
resp.setTariffAmount(buyerOrderGoodsService.getTariffAmount(goods));
resp.setCutPromotionAmount(buyerOrderGoodsService.getCutPromotionAmountStr(goods));
SellerOrderMeta sellerMeta = sellerOrderMetaMapper.selectBySkupAndKey(skup, SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS);
if(sellerMeta!=null){
JSONObject sellerMetaValue = JSONObject.parseObject(sellerMeta.getMetaValue());
... ...
... ... @@ -120,6 +120,7 @@
<th>税费</th>
<th>活动优惠</th>
<th>优惠券</th>
<th>促销金额</th>
<th>购买数量</th>
<th>运费</th>
<th>仓储费</th>
... ... @@ -139,6 +140,7 @@
<td><span id="tariffAmount"></span></td>
<td><span id="activityCutAmount"></span></td>
<td><span id="couponCutAmount"></span></td>
<td><span id="cutPromotionAmount"></span></td>
<td><span id="productNum"></span></td>
<td><span id="shipFee"></span></td>
<td><span id="depositAmount"></span></td>
... ... @@ -558,6 +560,7 @@ function getOrderInfo(orderCode){
$("#sizeName").html(result.data.sizeName);
$("#goodsPrice").html(result.data.goodsPrice);
$("#tariffAmount").html(result.data.tariffAmount);
$("#cutPromotionAmount").html(result.data.cutPromotionAmount);
if (result.data.couponCodeList) {
var codeListStr = '';
... ...