|
|
@@ -806,6 +806,10 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
@Override
|
|
|
public void closeOrder(Long orderId, Long userId) {
|
|
|
+ String orderCloseKey = RedisService.key.CLOSE_ORDER_TIME_KEY.getName() + orderId;
|
|
|
+ if (!redisService.setNx(orderCloseKey, orderId, RedisService.key.CLOSE_ORDER_TIME_KEY.getTimeout())) {
|
|
|
+ throw BusinessRuntimeException.getInstance("订单正在关闭中..");
|
|
|
+ }
|
|
|
//关闭订单逻辑
|
|
|
OrderDon orderDon = getById(orderId);
|
|
|
if (orderDon == null) {
|
|
|
@@ -2814,9 +2818,6 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
public void deductBalancePayOrderMoney(OrderDon orderDon, BigDecimal balance, User user) {
|
|
|
//存在余额
|
|
|
if (balance != null && balance.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- if (true) {
|
|
|
- throw BusinessRuntimeException.getInstance("暂不支持余额支付..");
|
|
|
- }
|
|
|
BigDecimal money = orderDon.getMoney();
|
|
|
//去掉余额 多出的部分
|
|
|
BigDecimal subBalance = balance;
|