fix(接口自动化):登出操作日志无操作人修复 #1005204

--bug=1005204 --user=赵勇 【系统设置-操作日志】... https://www.tapd.cn/55049933/s/1025815
This commit is contained in:
fit2-zhao 2021-07-19 14:11:38 +08:00 committed by fit2-zhao
parent f9f49e6670
commit 138f61d0ad
1 changed files with 8 additions and 0 deletions

View File

@ -97,6 +97,14 @@ public class MsLogAspect {
Map<String, Object> memberValues = (Map<String, Object>) value.get(invocationHandler);
memberValues.put("beforeValue", beforeContent);
}
if (msLog != null && StringUtils.isEmpty(msLog.operUser())) {
InvocationHandler invocationHandler = Proxy.getInvocationHandler(msLog);
Field value = invocationHandler.getClass().getDeclaredField("memberValues");
value.setAccessible(true);
Map<String, Object> memberValues = (Map<String, Object>) value.get(invocationHandler);
memberValues.put("operUser", SessionUtils.getUserId());
}
} catch (Exception e) {
LogUtil.error(e.getMessage());
}