Open qw19696 opened 2 hours ago
Boolean execute = transactionTemplate.execute(e -> { updateById(storeOrder); if (storeOrder.getPayType().equals(Constants.PAY_TYPE_YUE)) { //新增日志 request.setOrderId(storeOrder.getId()); userBillService.saveRefundBill(request, user); // 更新用户金额 userService.operationNowMoney(user.getUid(), request.getAmount(), user.getNowMoney(), "add"); // 退款task redisUtil.lPush(Constants.ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER, storeOrder.getId()); } if (storeOrder.getPayType().equals(Constants.PAY_TYPE_WE_CHAT) && request.getAmount().compareTo(BigDecimal.ZERO) == 0) { //新增日志 userBillService.saveRefundBill(request, user); // 退款task redisUtil.lPush(Constants.ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER, storeOrder.getId()); } return Boolean.TRUE; }); if (!execute) { storeOrderStatusService.saveRefund(storeOrder.getId(), request.getAmount(), "失败"); throw new CrmebException("订单更新失败"); } 比如这里,如果execute方法里面执行抛出了异常,这里也没有捕获,整个方法直接就被返回了 下面整个记录报错的部分根本就没机会进去 if (!execute) { storeOrderStatusService.saveRefund(storeOrder.getId(), request.getAmount(), "失败"); throw new CrmebException("订单更新失败"); }
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。