记得上下班打卡 | git大法好,push需谨慎

Commit 5a6e2972 authored by jiangxiulong's avatar jiangxiulong

超时退款快递费 存在就退

parent 4b42e440
......@@ -47,8 +47,7 @@ public class OrderRefundOvertimeServiceImpl implements IKylinOrderRefundsService
log.info("订单超时支付refundApply-Start:[orderTicketsId={}, [paymentId={}, paymentType={}]",
orderTicketsId, paymentId, paymentType);
KylinOrderTicketVo orderInfo = dataUtils.getOrderTicketVo(orderTicketsId);
// 快递费 未进行判断
BigDecimal RefundPriceExpress = orderInfo.getPriceExpress();
// 金额
BigDecimal priceActual = orderInfo.getPriceActual();
BigDecimal priceExpress = orderInfo.getPriceExpress();
......@@ -61,39 +60,16 @@ public class OrderRefundOvertimeServiceImpl implements IKylinOrderRefundsService
entities.setCanRefundedPrice(onePrice);
}
}
List<String> ticketEntityIds = entitiesList.stream().map(KylinOrderTicketEntities -> KylinOrderTicketEntities.getOrderTicketEntitiesId()).collect(Collectors.toList());
List<BigDecimal> entitiesPrice = entitiesList.stream().map(KylinOrderTicketEntities -> KylinOrderTicketEntities.getCanRefundedPrice()).collect(Collectors.toList());
boolean res = kylinRefundsStatusServiceImpl.orderTicketRefunding(
orderInfo, orderTicketsId,
RefundPriceExpress,
priceExpress,
ticketEntityIds, entitiesPrice, paymentId, paymentType
);
if (res) {
// 超时直接退还库存
// for (KylinOrderTicketEntitiesVo entitiesInfo : entitiesList) {
// // 因固定状态为未支付 所以无需判断 entitiesInfo.getIsPayment() == KylinTableStatusConst.ENTITIES_IS_PAYMENT3
// dataUtils.changeSurplusGeneral(entitiesInfo.getTicketId(), 1);
// dataUtils.changeBuyInfo(orderInfo.getUserId(), entitiesInfo.getEnterIdCode(), orderInfo.getPerformanceId(), entitiesInfo.getTicketId(), -1);
// }
// 退所有优惠券
/*ArrayList<KylinOrderCoupons> orderCoupon = dataUtils.getOrderCoupon(orderTicketsId);
if (!CollectionUtil.isEmpty(orderCoupon)) {
List<String> uCouponIds = orderCoupon.stream().map(KylinOrderCoupons -> KylinOrderCoupons.getCouponCode()).collect(Collectors.toList());
String uCouponIdsStr = Joiner.on(",").join(uCouponIds);
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("uCouponIds", uCouponIdsStr);
params.add("uid", orderInfo.getUserId());
MultiValueMap<String, String> headers = CollectionUtil.linkedMultiValueMapStringString();
headers.add("Accept", "application/json;charset=UTF-8");
log.info("订单超时支付refundApply-退所有优惠券:[orderTicketsId={}, [params={}, candyUrl={}]",
orderTicketsId, params, candyUrl);
String returnData = HttpUtil.post(candyUrl + "/candy-coupon/useBack", params, headers);
log.info("订单超时支付refundApply-退券结果:[returnData={}]", returnData);
}*/
// 优惠券 库存 积分 大美已自己处理
return true;
} else {
return false;
......@@ -104,4 +80,4 @@ public class OrderRefundOvertimeServiceImpl implements IKylinOrderRefundsService
public String getOrderRefundCode(String orderRefundCode, int type) {
return null;
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment