From 6ebf2b2a84b903f3600238dd084b3ae9ee4d6d3b Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Fri, 16 Apr 2021 17:33:07 +0800 Subject: [PATCH] Merge branch 'dev' of http://blit.7drlb.com:8888/r/moral into dev --- screen-api/src/main/java/com/moral/api/utils/OperationLogUtils.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/utils/OperationLogUtils.java b/screen-api/src/main/java/com/moral/api/utils/OperationLogUtils.java index c217379..19c9cf4 100644 --- a/screen-api/src/main/java/com/moral/api/utils/OperationLogUtils.java +++ b/screen-api/src/main/java/com/moral/api/utils/OperationLogUtils.java @@ -25,13 +25,15 @@ this.userLogService = userLogService; } - public static void insertLog(HttpServletRequest request, String content) { + public static void insertLog(HttpServletRequest request, String content, String type) { String token = request.getHeader("token"); Map<String, Object> currentUserInfo = (Map<String, Object>) TokenUtils.getUserInfoByToken(token); UserLog userLog = new UserLog(); + userLog.setType(type); userLog.setIp(WebUtils.getIpAddr(request)); userLog.setOperateId((Integer) currentUserInfo.get("userId")); - userLog.setOrganizationId((Integer) currentUserInfo.get("organizationId")); + Map<String, Object> orgInfo = (Map<String, Object>) currentUserInfo.get("organization"); + userLog.setOrganizationId((Integer) orgInfo.get("id")); userLog.setContent(content); userLogService.save(userLog); } -- Gitblit v1.8.0