Class OperationLogFactory
java.lang.Object
org.shoulder.log.operation.context.OperationLogFactory
操作日志实体构建器
(当前主要面向框架内部,不建议使用者调用该类中的方法,方法名称和参数不稳定)推荐使用注解方式。
- Author:
- lym
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OperationLogDTO创建一条操作日志 1.static List<OperationLogDTO> createFromTemplate(OperationLogDTO operationLogTemplate, Collection<? extends Operable> operableList) 1.
-
Constructor Details
-
OperationLogFactory
public OperationLogFactory()
-
-
Method Details
-
create
创建一条操作日志 1. 创建对象 2. 填充为内部任务日志 3. 若上下文存在登录的用户则将其当做操作者 -
createFromTemplate
public static List<OperationLogDTO> createFromTemplate(OperationLogDTO operationLogTemplate, @Nullable Collection<? extends Operable> operableList) 1. 根据 operationLogTemplate 创建 operableList.size() 条操作日志 2. 用 operableList 分别填充每条日志的被操作对象和 detailItem 字段如果 operableList 为空,则返回日志模板 operationLogTemplate。
- Parameters:
operationLogTemplate- 日志模板operableList- 被操作对象集合- Returns:
- 多条填充完毕的日志对象,至少返回包含一条日志的 List
-