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

Commit 230187d1 authored by 胡佳晨's avatar 胡佳晨

修改 退款回调bug

修改 取消订单回退券
parent 3e1a9bf4
......@@ -361,7 +361,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
storeOrder.setPriceVoucher(voucherPrice.add(storeVoucherPrice).add(voucherMarket));
storeOrder.setStatus(0);
storeOrder.setUcouponId(platVoucherCode);
storeOrder.setStoreCouponId(platVoucherCode);
storeOrder.setStoreCouponId(storeVoucherCode);
storeOrder.setPayType(param.getPayType());
storeOrder.setDeviceFrom(param.getDeviceFrom());
storeOrder.setSource(source);
......@@ -856,6 +856,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinStoreOrderVo orderVo = redisUtils.getGoblinOrder(orderId);
orderVo.setPriceRefund(orderVo.getPriceRefund().add(price));
if (orderVo.getPriceRefund().compareTo(orderVo.getPriceActual()) >= 0) {
//整单退款 退券
orderVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
if (!(orderVo.getUcouponId() == null || orderVo.getUcouponId().equals(""))) {
orderUtils.backCoupon(orderVo.getUcouponId(), orderVo.getUserId());
......@@ -874,7 +875,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
backOrderVo.setRefundAt(nowStr);
for (GoblinBackOrderSkuVo backOrderSkuVo : backOrderSkuVos) {
GoblinOrderSkuVo orderSkuVo = redisUtils.getGoblinOrderSkuVo(backOrderSkuVo.getOrderSkuId());
orderSkuVo.setPriceRefund(orderSkuVo.getPriceRefund() == null ? BigDecimal.ZERO : orderSkuVo.getPriceRefund().add(price));
orderSkuVo.setPriceRefund(orderSkuVo.getPriceRefund() == null ? price : orderSkuVo.getPriceRefund().add(price));
if (orderSkuVo.getPriceRefund().compareTo(orderSkuVo.getSkuPriceActual()) == 0) {
orderSkuVo.setStatus(GoblinStatusConst.Status.ORDER_STATUS_6.getValue());
String pre = GoblinStatusConst.MarketPreStatus.getPre(orderSkuVo.getSkuId());
......
......@@ -199,7 +199,7 @@ public class GoblinStoreBackOrderServiceImpl implements IGoblinStoreBackOrderSer
GoblinBackOrderVo backOrderVo = redisUtils.getBackOrderVo(backOrderId);
backOrderVo.setStatus(GoblinStatusConst.Status.ORDER_BACK_STATUS_3.getValue());
backOrderVo.setRefuseAt(nowStr);
backOrderVo.setRefuseSize(backOrderVo.getRefuseSize() + 1);
backOrderVo.setRefuseSize(backOrderVo.getRefuseSize() == null ? 1 : backOrderVo.getRefuseSize() + 1);
//添加日志
GoblinBackOrderLog backOrderLog = initBackLog(backOrderId, uid, now);
backOrderLog.setStatus(GoblinStatusConst.Status.ORDER_LOG_STATUS_22.getValue());
......
......@@ -195,15 +195,15 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
log.setRemark("商铺取消订单");
//回退平台券
if (!(orderVo.getUcouponId().equals("") || orderVo.getUcouponId() == null)) {
orderUtils.backCoupon(orderVo.getUcouponId(), uid);
if (!(orderVo.getUcouponId() == null||orderVo.getUcouponId().equals(""))) {
orderUtils.backCoupon(orderVo.getUcouponId(), orderVo.getUserId());
}
//回退店铺券
if (!(orderVo.getStoreCouponId().equals("") || orderVo.getStoreCouponId() == null)) {
if (!(orderVo.getStoreCouponId() == null||orderVo.getStoreCouponId().equals(""))) {
List<BackCouponParam> params = ObjectUtil.getBackCouponParam();
BackCouponParam backCouponParam = BackCouponParam.getNew();
backCouponParam.setuCouponIds(orderVo.getStoreCouponId());
backCouponParam.setUid(uid);
backCouponParam.setUid(orderVo.getUserId());
params.add(backCouponParam);
goblinCouponService.backCoupon(params);
}
......
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