日志注解修改2
This commit is contained in:
parent
af3a75b6cb
commit
45a743b391
|
|
@ -0,0 +1,87 @@
|
||||||
|
package com.securityControl.system.api.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.omg.CORBA.PRIVATE_MEMBER;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审计日志
|
||||||
|
* @author 黑子
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysLogsInfo {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 错做人
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
* 操作时间
|
||||||
|
*/
|
||||||
|
private String operTime;
|
||||||
|
/**
|
||||||
|
* 操作ip
|
||||||
|
*/
|
||||||
|
private String operIp;
|
||||||
|
/**
|
||||||
|
* 曹总模块
|
||||||
|
*/
|
||||||
|
private String operModel;
|
||||||
|
/**
|
||||||
|
* 曹总类型
|
||||||
|
*/
|
||||||
|
private String operType;
|
||||||
|
/**
|
||||||
|
* 操作 详情
|
||||||
|
*/
|
||||||
|
private String operDetails;
|
||||||
|
/**
|
||||||
|
* 操作结果 成功/失败
|
||||||
|
*/
|
||||||
|
private String operResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件类型 新增、修改、删除、导出、查询
|
||||||
|
*/
|
||||||
|
private String eventType;
|
||||||
|
/**
|
||||||
|
* 操作参数
|
||||||
|
*/
|
||||||
|
private String operParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作方法
|
||||||
|
*/
|
||||||
|
private String operMeth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志类型 0系统日志 1业务日志 2异常日志
|
||||||
|
*/
|
||||||
|
private int logType=1;
|
||||||
|
/**
|
||||||
|
* 异常等级
|
||||||
|
*/
|
||||||
|
private String errGrade;
|
||||||
|
/**
|
||||||
|
* 失败原因
|
||||||
|
*/
|
||||||
|
private String errReason;
|
||||||
|
/**
|
||||||
|
* 执行时间
|
||||||
|
*/
|
||||||
|
private String times;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.securityControl.common.log.annotation;
|
||||||
|
|
||||||
|
import com.securityControl.common.log.enums.BusinessType;
|
||||||
|
import com.securityControl.common.log.enums.OperaType;
|
||||||
|
import com.securityControl.common.log.enums.OperationType;
|
||||||
|
import com.securityControl.common.log.enums.OperatorType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义操作日志记录注解
|
||||||
|
*
|
||||||
|
* @author czc
|
||||||
|
*/
|
||||||
|
@Target({ElementType.PARAMETER, ElementType.METHOD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface SysLog {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
String title() default "";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模块
|
||||||
|
*/
|
||||||
|
String model() default "";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作详情
|
||||||
|
*/
|
||||||
|
String details() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务类型 默认 0 业务日志
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int logType() default 1;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型 默认查询
|
||||||
|
*/
|
||||||
|
public String operaType() default OperaType.QUERY;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否保存请求的参数
|
||||||
|
*/
|
||||||
|
boolean isSaveRequestData() default true;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue