Browse Source

修复bug

lijin 1 year ago
parent
commit
ebf237b6bd
1 changed files with 4 additions and 7 deletions
  1. 4 7
      sys-sdk/src/main/java/com/xy/utils/LogUtils.java

+ 4 - 7
sys-sdk/src/main/java/com/xy/utils/LogUtils.java

@@ -40,15 +40,12 @@ public class LogUtils {
      * @param optTime    操作耗时
      */
     public static void operate(LogEnum.LogType logType, LogEnum.OptType optType, String logContent, int optTime) {
-        Long loginId = null;
+        Long loginId = null, sysId = null;
+        String clientType = null;
         try {
             loginId = AuthorizeUtils.getLoginId(Long.class);
-        } catch (Exception e) {
-
-        }
-        Long sysId = null;
-        try {
             sysId = AuthorizeUtils.getSysId();
+            clientType = AuthorizeUtils.getClientType();
         } catch (Exception e) {
 
         }
@@ -58,7 +55,7 @@ public class LogUtils {
                 .set("optType", optType.getValue())
                 .set("createTime", DataTime.getSring())
                 .set("optTime", optTime)
-                .set("clientType", AuthorizeUtils.getClientType())
+                .set("clientType", clientType)
                 .set("sysId", sysId)
                 .set("optUserId", loginId)
                 .set("clientIp", getIp())