|
@@ -298,7 +298,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
log.info("下单请求 start is {} end is {}", start, System.currentTimeMillis());
|
|
|
|
|
|
//判断订单是否是无需支付的订单,若是,则直接完成订单
|
|
|
- if(BigDecimal.ZERO.equals(orderVo.getActualPrice())){
|
|
|
+ if (BigDecimal.ZERO.compareTo(orderVo.getActualPrice()) == 0) {
|
|
|
orderSuccess(orderVo);
|
|
|
}
|
|
|
return HttpResponseResult.succeed(orderVo);
|
|
@@ -640,7 +640,7 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
new BigDecimal(data.getExecutePaymentCallBack().getPayAmt()));
|
|
|
|
|
|
BigDecimal feeAmt = new BigDecimal(data.getExecutePaymentCallBack().getFeeAmt());
|
|
|
- if (BigDecimal.ZERO.equals(feeAmt)) {
|
|
|
+ if (BigDecimal.ZERO.compareTo(feeAmt) == 0) {
|
|
|
orderPayment.setFeeAmt(orderPayment.getPayAmt().subtract(orderPayment.getBackPayAmt()));
|
|
|
} else {
|
|
|
orderPayment.setFeeAmt(feeAmt);
|
|
@@ -665,7 +665,6 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
}
|
|
|
Long merchId = orderDetailVo.getMerchId();
|
|
|
if (merchId != null && merchId != 0) {
|
|
|
-
|
|
|
redissonClient.getBucket(CacheNameEnum.TEACHER_SUBJECT_ITEM.getRedisKey(merchId)).delete();
|
|
|
}
|
|
|
}
|
|
@@ -674,11 +673,11 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
}
|
|
|
|
|
|
private void testOrderSuccess(UserOrderVo detail) {
|
|
|
- if(null == detail || StringUtil.isEmpty(detail.getOrderNo())){
|
|
|
+ if (null == detail || StringUtil.isEmpty(detail.getOrderNo())) {
|
|
|
return;
|
|
|
}
|
|
|
//关闭当前正在支付的订单
|
|
|
- orderPaymentService.closePaymentAndReqOpen(detail.getOrderNo(),"交易取消");
|
|
|
+ orderPaymentService.closePaymentAndReqOpen(detail.getOrderNo(), "交易取消");
|
|
|
|
|
|
UserOrderPayment orderPayment = new UserOrderPayment();
|
|
|
OpenEnum openType = OpenEnum.valueOf(paymentProperties.getOpenType());
|