feat(common): 添加 @OperationLog 注解和 AuditAspect (T016/T017)

This commit is contained in:
wh
2026-04-09 13:28:38 +08:00
parent 3d1790ad64
commit 8fb730d281
2 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package com.label.common.aop;
import java.lang.annotation.*;
/**
* Marks a method for audit logging.
* The AuditAspect intercepts this annotation and writes to sys_operation_log.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface OperationLog {
/** Operation type, e.g., "EXTRACTION_APPROVE", "USER_LOGIN", "TASK_CLAIM" */
String type();
/** Target entity type, e.g., "annotation_task", "sys_user" */
String targetType() default "";
}