io.github.mouzt
bizlog-sdk
diff --git a/yudao-framework/pom.xml b/yudao-framework/pom.xml
index fba24dca5..d22b4638b 100644
--- a/yudao-framework/pom.xml
+++ b/yudao-framework/pom.xml
@@ -24,7 +24,6 @@
yudao-spring-boot-starter-excel
- yudao-spring-boot-starter-biz-operatelog
yudao-spring-boot-starter-biz-tenant
yudao-spring-boot-starter-biz-data-permission
yudao-spring-boot-starter-biz-ip
diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java
deleted file mode 100644
index b71342cb3..000000000
--- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringAopUtils.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package cn.iocoder.yudao.framework.common.util.spring;
-
-import cn.hutool.core.bean.BeanUtil;
-import org.springframework.aop.framework.AdvisedSupport;
-import org.springframework.aop.framework.AopProxy;
-import org.springframework.aop.support.AopUtils;
-
-/**
- * Spring AOP 工具类
- *
- * 参考波克尔 http://www.bubuko.com/infodetail-3471885.html 实现
- */
-public class SpringAopUtils {
-
- /**
- * 获取代理的目标对象
- *
- * @param proxy 代理对象
- * @return 目标对象
- */
- public static Object getTarget(Object proxy) throws Exception {
- // 不是代理对象
- if (!AopUtils.isAopProxy(proxy)) {
- return proxy;
- }
- // Jdk 代理
- if (AopUtils.isJdkDynamicProxy(proxy)) {
- return getJdkDynamicProxyTargetObject(proxy);
- }
- // Cglib 代理
- return getCglibProxyTargetObject(proxy);
- }
-
- private static Object getCglibProxyTargetObject(Object proxy) throws Exception {
- Object dynamicAdvisedInterceptor = BeanUtil.getFieldValue(proxy, "CGLIB$CALLBACK_0");
- AdvisedSupport advisedSupport = (AdvisedSupport) BeanUtil.getFieldValue(dynamicAdvisedInterceptor, "advised");
- return advisedSupport.getTargetSource().getTarget();
- }
-
- private static Object getJdkDynamicProxyTargetObject(Object proxy) throws Exception {
- AopProxy aopProxy = (AopProxy) BeanUtil.getFieldValue(proxy, "h");
- AdvisedSupport advisedSupport = (AdvisedSupport) BeanUtil.getFieldValue(aopProxy, "advised");
- return advisedSupport.getTargetSource().getTarget();
- }
-
-}
diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java
new file mode 100644
index 000000000..a501a7116
--- /dev/null
+++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/spring/SpringUtils.java
@@ -0,0 +1,24 @@
+package cn.iocoder.yudao.framework.common.util.spring;
+
+import cn.hutool.extra.spring.SpringUtil;
+
+import java.util.Objects;
+
+/**
+ * Spring 工具类
+ *
+ * @author 芋道源码
+ */
+public class SpringUtils extends SpringUtil {
+
+ /**
+ * 是否为生产环境
+ *
+ * @return 是否生产环境
+ */
+ public static boolean isProd() {
+ String activeProfile = getActiveProfile();
+ return Objects.equals("prod", activeProfile);
+ }
+
+}
diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml
deleted file mode 100644
index c52d8fc10..000000000
--- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
- cn.iocoder.boot
- yudao-framework
- ${revision}
-
- 4.0.0
- yudao-spring-boot-starter-biz-operatelog
- jar
-
- ${project.artifactId}
- 操作日志
- https://github.com/YunaiV/ruoyi-vue-pro
-
-
-
- cn.iocoder.boot
- yudao-common
-
-
-
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
-
-
- cn.iocoder.boot
- yudao-spring-boot-starter-web
- provided
-
-
-
-
- cn.iocoder.boot
- yudao-module-system-api
- ${revision}
-
-
-
-
- com.google.guava
- guava
-
-
-
-
-
diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java
deleted file mode 100644
index 441ec6bbd..000000000
--- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/config/YudaoOperateLogAutoConfiguration.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cn.iocoder.yudao.framework.operatelog.config;
-
-import cn.iocoder.yudao.framework.operatelog.core.aop.OperateLogAspect;
-import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService;
-import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkServiceImpl;
-import cn.iocoder.yudao.module.system.api.logger.OperateLogApi;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.context.annotation.Bean;
-
-@AutoConfiguration
-public class YudaoOperateLogAutoConfiguration {
-
- @Bean
- public OperateLogAspect operateLogAspect() {
- return new OperateLogAspect();
- }
-
- @Bean
- public OperateLogFrameworkService operateLogFrameworkService(OperateLogApi operateLogApi) {
- return new OperateLogFrameworkServiceImpl(operateLogApi);
- }
-
-}
diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java
deleted file mode 100644
index adac32736..000000000
--- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/annotations/OperateLog.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package cn.iocoder.yudao.framework.operatelog.core.annotations;
-
-import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * 操作日志注解
- *
- * @author 芋道源码
- */
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface OperateLog {
-
- // ========== 模块字段 ==========
-
- /**
- * 操作模块
- *
- * 为空时,会尝试读取 {@link Tag#name()} 属性
- */
- String module() default "";
- /**
- * 操作名
- *
- * 为空时,会尝试读取 {@link Operation#summary()} 属性
- */
- String name() default "";
- /**
- * 操作分类
- *
- * 实际并不是数组,因为枚举不能设置 null 作为默认值
- */
- OperateTypeEnum[] type() default {};
-
- // ========== 开关字段 ==========
-
- /**
- * 是否记录操作日志
- */
- boolean enable() default true;
- /**
- * 是否记录方法参数
- */
- boolean logArgs() default true;
- /**
- * 是否记录方法结果的数据
- */
- boolean logResultData() default true;
-
-}
diff --git a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java b/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java
deleted file mode 100644
index 4303208d1..000000000
--- a/yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java
+++ /dev/null
@@ -1,375 +0,0 @@
-package cn.iocoder.yudao.framework.operatelog.core.aop;
-
-import cn.hutool.core.date.LocalDateTimeUtil;
-import cn.hutool.core.exceptions.ExceptionUtil;
-import cn.hutool.core.util.ArrayUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
-import cn.iocoder.yudao.framework.common.pojo.CommonResult;
-import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
-import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils;
-import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils;
-import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum;
-import cn.iocoder.yudao.framework.operatelog.core.service.OperateLog;
-import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService;
-import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
-import com.google.common.collect.Maps;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import io.swagger.v3.oas.annotations.Operation;
-import lombok.extern.slf4j.Slf4j;
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.springframework.core.annotation.AnnotationUtils;
-import org.springframework.validation.BindingResult;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Array;
-import java.time.LocalDateTime;
-import java.util.*;
-import java.util.function.Predicate;
-import java.util.stream.IntStream;
-
-import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR;
-import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS;
-
-/**
- * 拦截使用 @OperateLog 注解,如果满足条件,则生成操作日志。
- * 满足如下任一条件,则会进行记录:
- * 1. 使用 @ApiOperation + 非 @GetMapping
- * 2. 使用 @OperateLog 注解
- *
- * 但是,如果声明 @OperateLog 注解时,将 enable 属性设置为 false 时,强制不记录。
- *
- * @author 芋道源码
- */
-@Aspect
-@Slf4j
-public class OperateLogAspect {
-
- /**
- * 用于记录操作内容的上下文
- *
- * @see OperateLog#getContent()
- */
- private static final ThreadLocal CONTENT = new ThreadLocal<>();
- /**
- * 用于记录拓展字段的上下文
- *
- * @see OperateLog#getExts()
- */
- private static final ThreadLocal
-