From 6c87de7a97ef96cc0b3dc6f786a7a33b4ca58bf9 Mon Sep 17 00:00:00 2001 From: paulGao Date: Thu, 13 Oct 2022 11:56:16 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E4=BC=98=E5=8C=96=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E6=97=A5=E5=BF=97=EF=BC=8C=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/order/aftersale/aop/AfterSaleLogPoint.java | 7 +++++++ .../order/aftersale/aop/AfterSaleOperationLogAspect.java | 5 +++++ .../order/aftersale/serviceimpl/AfterSaleServiceImpl.java | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleLogPoint.java b/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleLogPoint.java index 1e6c2965..5cbfde6a 100644 --- a/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleLogPoint.java +++ b/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleLogPoint.java @@ -27,4 +27,11 @@ public @interface AfterSaleLogPoint { */ String sn(); + + /** + * + * @return 售后状态 + */ + String serviceStatus() default ""; + } diff --git a/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleOperationLogAspect.java b/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleOperationLogAspect.java index 263c4006..660d76b2 100644 --- a/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleOperationLogAspect.java +++ b/framework/src/main/java/cn/lili/modules/order/aftersale/aop/AfterSaleOperationLogAspect.java @@ -1,5 +1,6 @@ package cn.lili.modules.order.aftersale.aop; +import cn.hutool.core.text.CharSequenceUtil; import cn.lili.common.security.AuthUser; import cn.lili.common.security.context.UserContext; import cn.lili.common.security.enums.UserEnums; @@ -7,6 +8,7 @@ import cn.lili.common.utils.SpelUtil; import cn.lili.common.utils.ThreadPoolUtil; import cn.lili.modules.order.aftersale.entity.dos.AfterSaleLog; import cn.lili.modules.order.aftersale.service.AfterSaleLogService; +import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterReturning; @@ -67,6 +69,9 @@ public class AfterSaleOperationLogAspect { AfterSaleLogPoint afterSaleLogPoint = signature.getMethod().getAnnotation(AfterSaleLogPoint.class); String description = SpelUtil.compileParams(joinPoint, rvt, afterSaleLogPoint.description()); String sn = SpelUtil.compileParams(joinPoint, rvt, afterSaleLogPoint.sn()); + if (CharSequenceUtil.isNotEmpty(afterSaleLogPoint.serviceStatus())) { + description += AfterSaleStatusEnum.valueOf(SpelUtil.compileParams(joinPoint, rvt, afterSaleLogPoint.serviceStatus())).description(); + } result.put("description", description); result.put("sn", sn); return result; diff --git a/framework/src/main/java/cn/lili/modules/order/aftersale/serviceimpl/AfterSaleServiceImpl.java b/framework/src/main/java/cn/lili/modules/order/aftersale/serviceimpl/AfterSaleServiceImpl.java index 768a6e94..22d9b33d 100644 --- a/framework/src/main/java/cn/lili/modules/order/aftersale/serviceimpl/AfterSaleServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/order/aftersale/serviceimpl/AfterSaleServiceImpl.java @@ -179,7 +179,7 @@ public class AfterSaleServiceImpl extends ServiceImpl