Authored by mali

优惠券优化

... ... @@ -1453,7 +1453,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
//throw new ServiceException(400,"错误:物流收货人手机号不能为空!");
}
LOGGER.info("callAppraise orderCode is {}, AppraiseExpressInfoBo is {}, startTime is {}", orderCode, bo ,DateUtil.getCurrentTimeSeconds());
LOGGER.info("callAppraise orderCode is {}, AppraiseExpressInfoBo is {}, startTime is {}", orderCode, bo, DateUtil.getCurrentTimeSeconds());
JSONObject jsonObject = serviceCaller.asyncCall(args, bo, JSONObject.class).get(5, TimeUnit.SECONDS);
LOGGER.info("callAppraise orderCode is {}, endTime is {}", orderCode, DateUtil.getCurrentTimeSeconds());
... ... @@ -1518,7 +1518,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
LOGGER.info("getDeliveryAddressByOrderCode call buyer address ,req is {}", req);
return this.getReceiveInfoByOrderCode(req);
}
LOGGER.info("getDeliveryAddressByOrderCode exit ,req is {} ,buyerOrder {}", req,buyerOrder);
LOGGER.info("getDeliveryAddressByOrderCode exit ,req is {} ,buyerOrder {}", req, buyerOrder);
return null;
}
... ... @@ -1723,6 +1723,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
}
private void completeAmountInfo(OrderDetailResp resp, String orderCode) {
List<OrderCoupon> orderCoupons = orderCouponMapper.selectByOrderCode(Long.valueOf(orderCode));
resp.setCouponCodeList(orderCoupons.stream().map(OrderCoupon::getCouponCode).collect(Collectors.toList()));
BuyerOrderMeta buyerMeta = buyerOrderMetaMapper.selectByOrderCodeAndKey(orderCode, ORDER_CONFIG_INNER_BUYER_FOR_AMMOUNT);
if (null == buyerMeta) {
return;
... ... @@ -1730,9 +1733,6 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
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()));
}
... ...