1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- package com.doc.common.annotation;
- import com.doc.common.enums.BusinessType;
- import com.doc.common.enums.EventLevel;
- import com.doc.common.enums.EventType;
- import com.doc.common.enums.OperatorType;
- import java.lang.annotation.*;
- /**
- * 自定义操作日志记录注解
- * 使用说明
- *
- * @author ruoyi
- * *** @Log(title = "用户管理", businessType = BusinessType.DELETE, eventLevel = EventLevel.HIGH)
- * eventLevel 默认为LOW ,eventType默认为BUSINESS ,
- * 当level和type为默认值的时候,可以不写
- */
- @Target({ElementType.PARAMETER, ElementType.METHOD})
- @Retention(RetentionPolicy.RUNTIME)
- @Documented
- public @interface Log {
- /**
- * 模块
- */
- public String title() default "";
- /**
- * 功能
- */
- public BusinessType businessType() default BusinessType.OTHER;
- /**
- * 操作人类别
- */
- public OperatorType operatorType() default OperatorType.MANAGE;
- /**
- * 事件类型
- */
- public EventType eventType() default EventType.BUSINESS;
- /**
- * 事件类型
- */
- public EventLevel eventLevel() default EventLevel.LOW;
- /**
- * 是否保存请求的参数
- */
- public boolean isSaveRequestData() default true;
- /**
- * 是否保存响应的参数
- */
- public boolean isSaveResponseData() default true;
- /**
- * 排除指定的请求参数
- */
- public String[] excludeParamNames() default {};
- }
|