From 470a8998fbc415d2dbcf1be2a83df5b8ae8334c7 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Sat, 28 Jan 2023 10:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Table=20=E6=B3=A8=E8=A7=A3?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeesite/modules/sys/utils/LogUtils.java | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/utils/LogUtils.java b/modules/core/src/main/java/com/jeesite/modules/sys/utils/LogUtils.java index 949d819a..91897446 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/utils/LogUtils.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/utils/LogUtils.java @@ -4,23 +4,6 @@ */ package com.jeesite.modules.sys.utils; -import java.lang.reflect.Method; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - -import javax.servlet.http.HttpServletRequest; - -import org.apache.ibatis.mapping.SqlCommandType; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.core.DefaultParameterNameDiscoverer; -import org.springframework.core.ParameterNameDiscoverer; -import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.method.HandlerMethod; - import com.jeesite.common.codec.EncodeUtils; import com.jeesite.common.config.Global; import com.jeesite.common.entity.BaseEntity; @@ -37,9 +20,23 @@ import com.jeesite.modules.sys.entity.Log; import com.jeesite.modules.sys.entity.User; import com.jeesite.modules.sys.service.LogService; import com.jeesite.modules.sys.service.MenuService; - import eu.bitwalker.useragentutils.UserAgent; import io.netty.util.concurrent.DefaultThreadFactory; +import org.apache.ibatis.mapping.SqlCommandType; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.core.DefaultParameterNameDiscoverer; +import org.springframework.core.ParameterNameDiscoverer; +import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.method.HandlerMethod; + +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; /** * 日志工具类 @@ -167,7 +164,7 @@ public class LogUtils { }; // 如果是BaseEntity的子类,则获取主键名 if (superClass != null){ - Table t = type.getAnnotation(Table.class); + Table t = MapperHelper.getTableCache(type); for (Column c : t.columns()){ if (c.isPK()){ try {