From f7aecbb238953c233dc742e7363ec23b3f4e9882 Mon Sep 17 00:00:00 2001 From: 彭雪彬 <1724387007@qq.com> Date: Thu, 17 Jul 2025 18:06:09 +0800 Subject: [PATCH] 骑手完成订单修改 --- oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderOperationLogServiceImpl.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderOperationLogServiceImpl.java b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderOperationLogServiceImpl.java index b878a17..efd75ab 100644 --- a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderOperationLogServiceImpl.java +++ b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderOperationLogServiceImpl.java @@ -54,6 +54,7 @@ @Transactional(rollbackFor = Exception.class) public void create(OrderResponse response, OrderStatusEnum statusEnum, String cardName) { String userType = ConstantsKey.BUYER; + String username = null; switch (statusEnum) { case ZERO: case ONE: @@ -62,6 +63,7 @@ userType = ConstantsKey.BUYER; break; case TWO: + username = response.getOrder().getUsername(); case FOUR: userType = ConstantsKey.MERCHANT; break; @@ -74,7 +76,9 @@ break; default: } - String username = SecurityUtils.getCurrentUsername(); + if (username == null) { + username = SecurityUtils.getCurrentUsername(); + } Timestamp time = new Timestamp(System.currentTimeMillis()); OrderOperationLog resources = new OrderOperationLog(); resources.setOrderNum(response.getOrder().getOrderNum()); -- Gitblit v1.9.3