退款问题
This commit is contained in:
@@ -81,7 +81,7 @@ public class OrderPayment implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String tradeNumber;
|
private String tradeNumber;
|
||||||
|
|
||||||
@Column(onUpdateValue = "now()")
|
// @Column(onUpdateValue = "now()")
|
||||||
private LocalDateTime payTime;
|
private LocalDateTime payTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
@Override
|
@Override
|
||||||
@CacheEvict(key = "#shopInfoEditDTO.id")
|
@CacheEvict(key = "#shopInfoEditDTO.id")
|
||||||
public Boolean edit(ShopInfoEditDTO shopInfoEditDTO) {
|
public Boolean edit(ShopInfoEditDTO shopInfoEditDTO) {
|
||||||
|
shopInfoEditDTO.setIsMemberPrice(null);
|
||||||
ShopInfo shopInfo;
|
ShopInfo shopInfo;
|
||||||
if (!StpKit.USER.isAdmin()) {
|
if (!StpKit.USER.isAdmin()) {
|
||||||
shopInfo = queryChain().eq(ShopInfo::getId, StpKit.USER.getShopId()).one();
|
shopInfo = queryChain().eq(ShopInfo::getId, StpKit.USER.getShopId()).one();
|
||||||
@@ -319,8 +320,6 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
rabbitPublisher.sendOrderDetailStatusMsg(shopInfo.getId().toString(), "shopInfoUpdate");
|
rabbitPublisher.sendOrderDetailStatusMsg(shopInfo.getId().toString(), "shopInfoUpdate");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -818,7 +818,7 @@ public class PayServiceImpl implements PayService {
|
|||||||
if (!returnProMap.isEmpty()) {
|
if (!returnProMap.isEmpty()) {
|
||||||
rabbitPublisher.sendOrderRefundMsg(JSONObject.toJSONString(Map.of("orderId", orderInfo.getId(), "returnProMap", returnProMap)));
|
rabbitPublisher.sendOrderRefundMsg(JSONObject.toJSONString(Map.of("orderId", orderInfo.getId(), "returnProMap", returnProMap)));
|
||||||
}
|
}
|
||||||
FunUtils.asyncSafeRunVoid(()->refundOrderAfter(orderInfo.getId(), orderInfo.getShopId(), orderInfo.getUserId(), orderInfo.getOrderNo(),
|
FunUtils.asyncSafeRunVoid(() -> refundOrderAfter(orderInfo.getId(), orderInfo.getShopId(), orderInfo.getUserId(), orderInfo.getOrderNo(),
|
||||||
orderInfo.getPointsNum(), isFirstRefund, orderInfo.getStatus().equals(OrderStatusEnums.REFUND.getCode())));
|
orderInfo.getPointsNum(), isFirstRefund, orderInfo.getStatus().equals(OrderStatusEnums.REFUND.getCode())));
|
||||||
return CzgResult.success();
|
return CzgResult.success();
|
||||||
}
|
}
|
||||||
@@ -864,12 +864,11 @@ public class PayServiceImpl implements PayService {
|
|||||||
}
|
}
|
||||||
throw new CzgException(refund.getMsg());
|
throw new CzgException(refund.getMsg());
|
||||||
} else {
|
} else {
|
||||||
paymentService.updateChain()
|
OrderPayment uOrderPayment = new OrderPayment();
|
||||||
.eq(OrderPayment::getId, refundId)
|
uOrderPayment.setPayTime(LocalDateTime.now());
|
||||||
.set(OrderPayment::getPayTime, refund.getData().getRefundTime())
|
uOrderPayment.setTradeNumber(refund.getData().getRefundOrderId());
|
||||||
.set(OrderPayment::getTradeNumber, refund.getData().getRefundOrderId())
|
uOrderPayment.setRespJson(JSONObject.toJSONString(refund.getData()));
|
||||||
.set(OrderPayment::getRespJson, JSONObject.toJSONString(refund.getData()))
|
paymentService.update(uOrderPayment, QueryWrapper.create().eq(OrderPayment::getId, refundId));
|
||||||
.update();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user