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 {};
|
}
|