增加一个额外的字段用于额外的查询条件
This commit is contained in:
@@ -52,12 +52,15 @@ public class FlowableInstance {
|
||||
@LastModifiedDate
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
private String extra;
|
||||
|
||||
@SneakyThrows
|
||||
public FlowableInstance(com.lanyuanxiaoyao.flowable.core.model.FlowableInstance instance) {
|
||||
this.instanceId = instance.getInstanceId();
|
||||
this.metadata = objectToBytes(instance.getMetadata());
|
||||
this.currentNodeId = instance.getCurrentNodeId();
|
||||
this.status = instance.getStatus();
|
||||
this.extra = instance.getExtra();
|
||||
}
|
||||
|
||||
private static byte[] objectToBytes(Object object) throws IOException {
|
||||
@@ -86,6 +89,7 @@ public class FlowableInstance {
|
||||
.status(status)
|
||||
.createdTime(createdTime)
|
||||
.updatedTime(updatedTime)
|
||||
.extra(extra)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ public class FlowableInstance {
|
||||
@Builder.Default
|
||||
private LocalDateTime updatedTime = LocalDateTime.now();
|
||||
|
||||
private String extra;
|
||||
|
||||
public void addMetadata(Map<String, Object> metadata) {
|
||||
this.metadata.putAll(metadata);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user