|
|
@@ -106,7 +106,8 @@ public class OrderPayService {
|
|
|
System.currentTimeMillis()));
|
|
|
}
|
|
|
|
|
|
- public void payOrderAgreement(Long orderId, String bindCardId) {
|
|
|
+ @Cacheable(value = "payOrder", key = "'order#'+#orderId")
|
|
|
+ public Object payOrderAgreement(Long orderId, String bindCardId) {
|
|
|
Order order = orderRepo.findById(orderId).orElseThrow(new BusinessException("订单不存在"));
|
|
|
if (order.getStatus() != OrderStatus.NOT_PAID) {
|
|
|
throw new BusinessException("订单状态错误");
|
|
|
@@ -118,7 +119,7 @@ public class OrderPayService {
|
|
|
if (StringUtils.isEmpty(bindCardId)) {
|
|
|
throw new BusinessException("请先绑定银行卡");
|
|
|
}
|
|
|
- payEaseService.pay(order.getName(), orderId.toString(), order.getTotalPrice(),
|
|
|
+ return payEaseService.pay(order.getName(), orderId.toString(), order.getTotalPrice(),
|
|
|
order.getUserId().toString(), bindCardId);
|
|
|
}
|
|
|
|