diff --git a/IDEA/src/main/java/com/example/api/annotation/DisableBaseResponse.java b/IDEA/src/main/java/com/example/api/annotation/DisableBaseResponse.java new file mode 100644 index 00000000..6a31ba6d --- /dev/null +++ b/IDEA/src/main/java/com/example/api/annotation/DisableBaseResponse.java @@ -0,0 +1,14 @@ +package com.example.api.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 加上注解后不统一封装返回 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface DisableBaseResponse { +} diff --git a/IDEA/src/main/java/com/example/api/annotation/Log.java b/IDEA/src/main/java/com/example/api/annotation/Log.java new file mode 100644 index 00000000..3f579570 --- /dev/null +++ b/IDEA/src/main/java/com/example/api/annotation/Log.java @@ -0,0 +1,20 @@ +package com.example.api.annotation; + +import com.example.api.model.enums.BusinessType; + +import java.lang.annotation.*; + +@Target(ElementType.METHOD) //目标类型 +@Retention(RetentionPolicy.RUNTIME) //作用范围 +@Documented +public @interface Log { + /* + 功能模块 + */ + String module() default ""; + + /* + 操作类型 + */ + BusinessType type(); +}