mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2026-03-30 03:13:04 +00:00
feat:【mall】优化订单日志切面中的用户信息获取逻辑,同步 https://gitee.com/zhijiantianya/yudao-cloud/pulls/231/files
This commit is contained in:
@@ -65,11 +65,17 @@ public class TradeOrderLogAspect {
|
||||
public void doAfterReturning(JoinPoint joinPoint, TradeOrderLog orderLog) {
|
||||
try {
|
||||
// 1.1 操作用户
|
||||
Integer userType = getUserType();
|
||||
Long userId = getUserId();
|
||||
Integer userType = USER_TYPE.get();
|
||||
if (ObjectUtil.isNull(userType)) {
|
||||
userType = getUserType();
|
||||
}
|
||||
Long userId = USER_ID.get();
|
||||
if (ObjectUtil.isNull(userId)) {
|
||||
userId = getUserId();
|
||||
}
|
||||
// 1.2 订单信息
|
||||
Long orderId = ORDER_ID.get();
|
||||
if (orderId == null) { // 如果未设置,只有注解,说明不需要记录日志
|
||||
if (ObjectUtil.isNull(orderId)) { // 如果未设置,只有注解,说明不需要记录日志
|
||||
return;
|
||||
}
|
||||
Integer beforeStatus = BEFORE_STATUS.get();
|
||||
@@ -136,4 +142,4 @@ public class TradeOrderLogAspect {
|
||||
EXTS.remove();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user