调整类命名
This commit is contained in:
@@ -0,0 +1,106 @@
|
|||||||
|
package com.lanyuanxiaoyao.flowable.jpa;
|
||||||
|
|
||||||
|
import com.lanyuanxiaoyao.flowable.core.repository.FlowableRepository;
|
||||||
|
import com.lanyuanxiaoyao.flowable.jpa.entity.FlowableHistory;
|
||||||
|
import com.lanyuanxiaoyao.flowable.jpa.entity.FlowableInstance;
|
||||||
|
import com.lanyuanxiaoyao.flowable.jpa.entity.FlowableNode;
|
||||||
|
import com.lanyuanxiaoyao.flowable.jpa.repository.FlowableHistoryRepository;
|
||||||
|
import com.lanyuanxiaoyao.flowable.jpa.repository.FlowableInstanceRepository;
|
||||||
|
import com.lanyuanxiaoyao.flowable.jpa.repository.FlowableNodeRepository;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lanyuanxiaoyao
|
||||||
|
* @version 20241231
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SpringFlowableRepository implements FlowableRepository {
|
||||||
|
private final FlowableNodeRepository flowableNodeRepository;
|
||||||
|
private final FlowableInstanceRepository flowableInstanceRepository;
|
||||||
|
private final FlowableHistoryRepository flowableHistoryRepository;
|
||||||
|
|
||||||
|
public SpringFlowableRepository(FlowableNodeRepository flowableNodeRepository, FlowableInstanceRepository flowableInstanceRepository, FlowableHistoryRepository flowableHistoryRepository) {
|
||||||
|
this.flowableNodeRepository = flowableNodeRepository;
|
||||||
|
this.flowableInstanceRepository = flowableInstanceRepository;
|
||||||
|
this.flowableHistoryRepository = flowableHistoryRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void saveNode(com.lanyuanxiaoyao.flowable.core.model.FlowableNode node) {
|
||||||
|
flowableNodeRepository.save(new FlowableNode(node));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void saveNode(List<com.lanyuanxiaoyao.flowable.core.model.FlowableNode> nodes) {
|
||||||
|
flowableNodeRepository.saveAll(nodes.stream().map(FlowableNode::new).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public com.lanyuanxiaoyao.flowable.core.model.FlowableNode getNode(String nodeId) {
|
||||||
|
return flowableNodeRepository.findById(nodeId)
|
||||||
|
.map(FlowableNode::toFlowableNode)
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<com.lanyuanxiaoyao.flowable.core.model.FlowableNode> listNodes() {
|
||||||
|
return flowableNodeRepository.findAll()
|
||||||
|
.stream()
|
||||||
|
.map(FlowableNode::toFlowableNode)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void saveInstance(com.lanyuanxiaoyao.flowable.core.model.FlowableInstance instance) {
|
||||||
|
flowableInstanceRepository.save(new FlowableInstance(instance));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public com.lanyuanxiaoyao.flowable.core.model.FlowableInstance getInstance(String instantId) {
|
||||||
|
return flowableInstanceRepository.findById(instantId)
|
||||||
|
.map(FlowableInstance::toFlowableInstance)
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<com.lanyuanxiaoyao.flowable.core.model.FlowableInstance> listInstances() {
|
||||||
|
return flowableInstanceRepository.findAll()
|
||||||
|
.stream()
|
||||||
|
.map(FlowableInstance::toFlowableInstance)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void saveHistory(com.lanyuanxiaoyao.flowable.core.model.FlowableHistory history) {
|
||||||
|
flowableHistoryRepository.save(new FlowableHistory(history));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public com.lanyuanxiaoyao.flowable.core.model.FlowableHistory getHistory(String historyId) {
|
||||||
|
return flowableHistoryRepository.findById(historyId)
|
||||||
|
.map(FlowableHistory::toFlowableHistory)
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<com.lanyuanxiaoyao.flowable.core.model.FlowableHistory> listHistories(String instanceId) {
|
||||||
|
return flowableHistoryRepository.findAllByInstanceId(instanceId)
|
||||||
|
.stream()
|
||||||
|
.map(FlowableHistory::toFlowableHistory)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void saveInstanceAndHistory(com.lanyuanxiaoyao.flowable.core.model.FlowableInstance instance, com.lanyuanxiaoyao.flowable.core.model.FlowableHistory history) {
|
||||||
|
saveInstance(instance);
|
||||||
|
saveHistory(history);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
package com.lanyuanxiaoyao.flowable.jpa;
|
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableHistory;
|
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableInstance;
|
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableNode;
|
|
||||||
import com.lanyuanxiaoyao.flowable.core.repository.FlowableRepository;
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.entity.JpaFlowableHistory;
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.entity.JpaFlowableInstance;
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.entity.JpaFlowableNode;
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.repository.JpaFlowableHistoryRepository;
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.repository.JpaFlowableInstanceRepository;
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.repository.JpaFlowableNodeRepository;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import javax.transaction.Transactional;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lanyuanxiaoyao
|
|
||||||
* @version 20241231
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class SpringJpaFlowableRepository implements FlowableRepository {
|
|
||||||
private final JpaFlowableNodeRepository jpaFlowableNodeRepository;
|
|
||||||
private final JpaFlowableInstanceRepository jpaFlowableInstanceRepository;
|
|
||||||
private final JpaFlowableHistoryRepository jpaFlowableHistoryRepository;
|
|
||||||
|
|
||||||
public SpringJpaFlowableRepository(JpaFlowableNodeRepository jpaFlowableNodeRepository, JpaFlowableInstanceRepository jpaFlowableInstanceRepository, JpaFlowableHistoryRepository jpaFlowableHistoryRepository) {
|
|
||||||
this.jpaFlowableNodeRepository = jpaFlowableNodeRepository;
|
|
||||||
this.jpaFlowableInstanceRepository = jpaFlowableInstanceRepository;
|
|
||||||
this.jpaFlowableHistoryRepository = jpaFlowableHistoryRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackOn = Exception.class)
|
|
||||||
@Override
|
|
||||||
public void saveNode(FlowableNode node) {
|
|
||||||
jpaFlowableNodeRepository.save(new JpaFlowableNode(node));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackOn = Exception.class)
|
|
||||||
@Override
|
|
||||||
public void saveNode(List<FlowableNode> nodes) {
|
|
||||||
jpaFlowableNodeRepository.saveAll(nodes.stream().map(JpaFlowableNode::new).collect(Collectors.toList()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FlowableNode getNode(String nodeId) {
|
|
||||||
return jpaFlowableNodeRepository.findById(nodeId)
|
|
||||||
.map(JpaFlowableNode::toFlowableNode)
|
|
||||||
.orElse(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FlowableNode> listNodes() {
|
|
||||||
return jpaFlowableNodeRepository.findAll()
|
|
||||||
.stream()
|
|
||||||
.map(JpaFlowableNode::toFlowableNode)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackOn = Exception.class)
|
|
||||||
@Override
|
|
||||||
public void saveInstance(FlowableInstance instance) {
|
|
||||||
jpaFlowableInstanceRepository.save(new JpaFlowableInstance(instance));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FlowableInstance getInstance(String instantId) {
|
|
||||||
return jpaFlowableInstanceRepository.findById(instantId)
|
|
||||||
.map(JpaFlowableInstance::toFlowableInstance)
|
|
||||||
.orElse(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FlowableInstance> listInstances() {
|
|
||||||
return jpaFlowableInstanceRepository.findAll()
|
|
||||||
.stream()
|
|
||||||
.map(JpaFlowableInstance::toFlowableInstance)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackOn = Exception.class)
|
|
||||||
@Override
|
|
||||||
public void saveHistory(FlowableHistory history) {
|
|
||||||
jpaFlowableHistoryRepository.save(new JpaFlowableHistory(history));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FlowableHistory getHistory(String historyId) {
|
|
||||||
return jpaFlowableHistoryRepository.findById(historyId)
|
|
||||||
.map(JpaFlowableHistory::toFlowableHistory)
|
|
||||||
.orElse(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<FlowableHistory> listHistories(String instanceId) {
|
|
||||||
return jpaFlowableHistoryRepository.findAllByInstanceId(instanceId)
|
|
||||||
.stream()
|
|
||||||
.map(JpaFlowableHistory::toFlowableHistory)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackOn = Exception.class)
|
|
||||||
@Override
|
|
||||||
public void saveInstanceAndHistory(FlowableInstance instance, FlowableHistory history) {
|
|
||||||
saveInstance(instance);
|
|
||||||
saveHistory(history);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.flowable.jpa.entity;
|
package com.lanyuanxiaoyao.flowable.jpa.entity;
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableAction;
|
import com.lanyuanxiaoyao.flowable.core.model.FlowableAction;
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableHistory;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -9,7 +8,6 @@ import javax.persistence.EntityListeners;
|
|||||||
import javax.persistence.EnumType;
|
import javax.persistence.EnumType;
|
||||||
import javax.persistence.Enumerated;
|
import javax.persistence.Enumerated;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Table;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -27,10 +25,9 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "flowable_history")
|
|
||||||
@DynamicUpdate
|
@DynamicUpdate
|
||||||
@EntityListeners(AuditingEntityListener.class)
|
@EntityListeners(AuditingEntityListener.class)
|
||||||
public class JpaFlowableHistory {
|
public class FlowableHistory {
|
||||||
@Id
|
@Id
|
||||||
private String historyId;
|
private String historyId;
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
@@ -41,14 +38,14 @@ public class JpaFlowableHistory {
|
|||||||
@CreatedDate
|
@CreatedDate
|
||||||
private LocalDateTime createdTime;
|
private LocalDateTime createdTime;
|
||||||
|
|
||||||
public JpaFlowableHistory(FlowableHistory history) {
|
public FlowableHistory(com.lanyuanxiaoyao.flowable.core.model.FlowableHistory history) {
|
||||||
this.historyId = history.getHistoryId();
|
this.historyId = history.getHistoryId();
|
||||||
this.instanceId = history.getInstanceId();
|
this.instanceId = history.getInstanceId();
|
||||||
this.action = history.getAction();
|
this.action = history.getAction();
|
||||||
this.comment = history.getComment();
|
this.comment = history.getComment();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FlowableHistory toFlowableHistory() {
|
public com.lanyuanxiaoyao.flowable.core.model.FlowableHistory toFlowableHistory() {
|
||||||
return new FlowableHistory(historyId, instanceId, action, comment, createdTime);
|
return new com.lanyuanxiaoyao.flowable.core.model.FlowableHistory(historyId, instanceId, action, comment, createdTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.lanyuanxiaoyao.flowable.jpa.entity;
|
package com.lanyuanxiaoyao.flowable.jpa.entity;
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableInstance;
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -15,7 +14,6 @@ import javax.persistence.EnumType;
|
|||||||
import javax.persistence.Enumerated;
|
import javax.persistence.Enumerated;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Lob;
|
import javax.persistence.Lob;
|
||||||
import javax.persistence.Table;
|
|
||||||
import lombok.Cleanup;
|
import lombok.Cleanup;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -36,10 +34,9 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "flowable_instance")
|
|
||||||
@DynamicUpdate
|
@DynamicUpdate
|
||||||
@EntityListeners(AuditingEntityListener.class)
|
@EntityListeners(AuditingEntityListener.class)
|
||||||
public class JpaFlowableInstance {
|
public class FlowableInstance {
|
||||||
@Id
|
@Id
|
||||||
private String instanceId;
|
private String instanceId;
|
||||||
@Lob
|
@Lob
|
||||||
@@ -48,7 +45,7 @@ public class JpaFlowableInstance {
|
|||||||
private String currentNodeId;
|
private String currentNodeId;
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private FlowableInstance.Status status = FlowableInstance.Status.RUNNING;
|
private com.lanyuanxiaoyao.flowable.core.model.FlowableInstance.Status status = com.lanyuanxiaoyao.flowable.core.model.FlowableInstance.Status.RUNNING;
|
||||||
|
|
||||||
@CreatedDate
|
@CreatedDate
|
||||||
private LocalDateTime createdTime;
|
private LocalDateTime createdTime;
|
||||||
@@ -56,7 +53,7 @@ public class JpaFlowableInstance {
|
|||||||
private LocalDateTime updatedTime;
|
private LocalDateTime updatedTime;
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public JpaFlowableInstance(FlowableInstance instance) {
|
public FlowableInstance(com.lanyuanxiaoyao.flowable.core.model.FlowableInstance instance) {
|
||||||
this.instanceId = instance.getInstanceId();
|
this.instanceId = instance.getInstanceId();
|
||||||
this.metadata = objectToBytes(instance.getMetadata());
|
this.metadata = objectToBytes(instance.getMetadata());
|
||||||
this.currentNodeId = instance.getCurrentNodeId();
|
this.currentNodeId = instance.getCurrentNodeId();
|
||||||
@@ -81,8 +78,8 @@ public class JpaFlowableInstance {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public FlowableInstance toFlowableInstance() {
|
public com.lanyuanxiaoyao.flowable.core.model.FlowableInstance toFlowableInstance() {
|
||||||
return new FlowableInstance(
|
return new com.lanyuanxiaoyao.flowable.core.model.FlowableInstance(
|
||||||
instanceId,
|
instanceId,
|
||||||
currentNodeId,
|
currentNodeId,
|
||||||
(Map<String, Object>) bytesToObject(this.metadata),
|
(Map<String, Object>) bytesToObject(this.metadata),
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.flowable.jpa.entity;
|
package com.lanyuanxiaoyao.flowable.jpa.entity;
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableAction;
|
import com.lanyuanxiaoyao.flowable.core.model.FlowableAction;
|
||||||
import com.lanyuanxiaoyao.flowable.core.model.FlowableNode;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.persistence.CollectionTable;
|
import javax.persistence.CollectionTable;
|
||||||
@@ -15,7 +14,6 @@ import javax.persistence.Enumerated;
|
|||||||
import javax.persistence.ForeignKey;
|
import javax.persistence.ForeignKey;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.MapKeyColumn;
|
import javax.persistence.MapKeyColumn;
|
||||||
import javax.persistence.Table;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -34,10 +32,9 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "flowable_node")
|
|
||||||
@DynamicUpdate
|
@DynamicUpdate
|
||||||
@EntityListeners(AuditingEntityListener.class)
|
@EntityListeners(AuditingEntityListener.class)
|
||||||
public class JpaFlowableNode {
|
public class FlowableNode {
|
||||||
@Id
|
@Id
|
||||||
private String nodeId;
|
private String nodeId;
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
@@ -46,7 +43,7 @@ public class JpaFlowableNode {
|
|||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private FlowableNode.Type type;
|
private com.lanyuanxiaoyao.flowable.core.model.FlowableNode.Type type;
|
||||||
private String handler;
|
private String handler;
|
||||||
@ElementCollection(fetch = javax.persistence.FetchType.EAGER)
|
@ElementCollection(fetch = javax.persistence.FetchType.EAGER)
|
||||||
@MapKeyColumn(name = "action")
|
@MapKeyColumn(name = "action")
|
||||||
@@ -59,7 +56,7 @@ public class JpaFlowableNode {
|
|||||||
@LastModifiedDate
|
@LastModifiedDate
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
public JpaFlowableNode(FlowableNode node) {
|
public FlowableNode(com.lanyuanxiaoyao.flowable.core.model.FlowableNode node) {
|
||||||
this.nodeId = node.getNodeId();
|
this.nodeId = node.getNodeId();
|
||||||
this.name = node.getName();
|
this.name = node.getName();
|
||||||
this.description = node.getDescription();
|
this.description = node.getDescription();
|
||||||
@@ -68,8 +65,8 @@ public class JpaFlowableNode {
|
|||||||
this.targets = node.getTargets();
|
this.targets = node.getTargets();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FlowableNode toFlowableNode() {
|
public com.lanyuanxiaoyao.flowable.core.model.FlowableNode toFlowableNode() {
|
||||||
FlowableNode node = new FlowableNode(nodeId, name, description, type, handler, targets, null, createdTime);
|
com.lanyuanxiaoyao.flowable.core.model.FlowableNode node = new com.lanyuanxiaoyao.flowable.core.model.FlowableNode(nodeId, name, description, type, handler, targets, null, createdTime);
|
||||||
node.setUpdatedTime(updateTime);
|
node.setUpdatedTime(updateTime);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.flowable.jpa.repository;
|
package com.lanyuanxiaoyao.flowable.jpa.repository;
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.entity.JpaFlowableHistory;
|
import com.lanyuanxiaoyao.flowable.jpa.entity.FlowableHistory;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@@ -10,6 +10,6 @@ import org.springframework.stereotype.Repository;
|
|||||||
* @version 20250102
|
* @version 20250102
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface JpaFlowableHistoryRepository extends JpaRepository<JpaFlowableHistory, String> {
|
public interface FlowableHistoryRepository extends JpaRepository<FlowableHistory, String> {
|
||||||
List<JpaFlowableHistory> findAllByInstanceId(String instanceId);
|
List<FlowableHistory> findAllByInstanceId(String instanceId);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.flowable.jpa.repository;
|
package com.lanyuanxiaoyao.flowable.jpa.repository;
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.entity.JpaFlowableInstance;
|
import com.lanyuanxiaoyao.flowable.jpa.entity.FlowableInstance;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -9,5 +9,5 @@ import org.springframework.stereotype.Repository;
|
|||||||
* @version 20250102
|
* @version 20250102
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface JpaFlowableInstanceRepository extends JpaRepository<JpaFlowableInstance, String> {
|
public interface FlowableInstanceRepository extends JpaRepository<FlowableInstance, String> {
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.lanyuanxiaoyao.flowable.jpa.repository;
|
package com.lanyuanxiaoyao.flowable.jpa.repository;
|
||||||
|
|
||||||
import com.lanyuanxiaoyao.flowable.jpa.entity.JpaFlowableNode;
|
import com.lanyuanxiaoyao.flowable.jpa.entity.FlowableNode;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -9,5 +9,5 @@ import org.springframework.stereotype.Repository;
|
|||||||
* @version 20250102
|
* @version 20250102
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface JpaFlowableNodeRepository extends JpaRepository<JpaFlowableNode, String> {
|
public interface FlowableNodeRepository extends JpaRepository<FlowableNode, String> {
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user