...
|
...
|
@@ -217,6 +217,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
private static final String SELLER_ORDER_META_KEY_FEE = "fee";
|
|
|
|
|
|
private static final String ORDER_CONFIG_INNER_BUYER_FOR_OFFLINE = "inner_buyer_for_offline";
|
|
|
|
|
|
private static final String ORDER_CONFIG_INNER_BUYER_FOR_AMMOUNT = "amount_detail"; // 优惠详情
|
|
|
|
|
|
private static final Integer EXPRESS_TYPE_SELLER_TO_JUDGE = EnumExpressType.EXPRESS_TYPE_1.getCode();
|
|
|
|
...
|
...
|
@@ -1715,10 +1717,25 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setPlatformWaybillCode(judgeExpressRecord.getWaybillCode());
|
|
|
}
|
|
|
|
|
|
resp.setCouponCode(Optional.ofNullable(Long.valueOf(buyerOrder.getOrderCode())).map(orderCouponMapper::selectByOrderCode).map(OrderCoupon::getCouponCode).orElse(null));
|
|
|
completeAmountInfo(resp, orderCode); // 补充优惠券的信息
|
|
|
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
private void completeAmountInfo(OrderDetailResp resp, String orderCode) {
|
|
|
BuyerOrderMeta buyerMeta = buyerOrderMetaMapper.selectByOrderCodeAndKey(orderCode, ORDER_CONFIG_INNER_BUYER_FOR_AMMOUNT);
|
|
|
if (null == buyerMeta) {
|
|
|
return;
|
|
|
}
|
|
|
JSONObject metaValue = JSONObject.parseObject(buyerMeta.getMetaValue());
|
|
|
resp.setShipFee(String.format("%.2f", metaValue.getDoubleValue("shippingAmount")));// 运费
|
|
|
resp.setCouponCutAmount(String.format("%.2f", metaValue.getDoubleValue("couponCutAmount") + metaValue.getDoubleValue("shippingCouponCutAmount")));
|
|
|
|
|
|
List<OrderCoupon> orderCoupons = orderCouponMapper.selectByOrderCode(Long.valueOf(orderCode));
|
|
|
resp.setCouponCodeList(orderCoupons.stream().map(OrderCoupon::getCouponCode).collect(Collectors.toList()));
|
|
|
}
|
|
|
|
|
|
|
|
|
@Override
|
|
|
public QcOrderDetailResp getQcOrderDetail(String orderCode) {
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
...
|
...
|
|