yyy
2026-05-12 1c0cf8959b261e405d3656b6087d2e9dd3e1cbda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package com.xiaopeng.common.log.annotation;
 
import com.xiaopeng.common.log.enums.AdminBusinessType;
import com.xiaopeng.common.log.enums.AdminOperationType;
 
import java.lang.annotation.Documented;
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)
@Documented
public @interface AdminOperationLog {
 
    /**
     * 业务类型。不配置时从 ApiOperation tags 中推断。
     */
    AdminBusinessType businessType();
 
    /**
     * 操作类型。不配置时从注解内容或 ApiOperation value 中推断。
     */
    AdminOperationType operationType() default AdminOperationType.OTHER;
 
    /**
     * 操作类型 SpEL 表达式,支持 #p0/#a0/#arg0,返回枚举名称、code 或描述。
     */
    String operationTypeExpression() default "";
 
    /**
     * 静态操作内容。不配置时使用 ApiOperation value。
     */
    String content() default "";
 
    /**
     * SpEL 表达式,支持 #p0/#a0/#arg0 与 #result。
     */
    String contentExpression() default "";
 
    /**
     * 是否在操作内容后追加请求参数。
     */
    boolean appendRequestData() default false;
 
    /**
     * 追加请求参数时排除的字段。
     */
    String[] excludeParamNames() default {};
}