Skip to content

Commit 2463231

Browse files
authored
Merge pull request #112 from codingapi/dev
Dev
2 parents b23b538 + f4dd903 commit 2463231

File tree

44 files changed

+178
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+178
-51
lines changed

admin-ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"@ant-design/icons": "^5.4.0",
77
"@ant-design/pro-components": "^2.8.7",
88
"@babel/standalone": "^7.25.6",
9-
"@codingapi/flow-pc": "^0.0.38",
10-
"@codingapi/form-pc": "^0.0.38",
11-
"@codingapi/ui-framework": "^0.0.38",
9+
"@codingapi/flow-pc": "^0.0.39",
10+
"@codingapi/form-pc": "^0.0.39",
11+
"@codingapi/ui-framework": "^0.0.39",
1212
"@dnd-kit/core": "^6.2.0",
1313
"@dnd-kit/sortable": "^9.0.0",
1414
"@handsontable/react-wrapper": "^15.0.0",

example/example-app/example-app-cmd-domain/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>example-app</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

example/example-app/example-app-cmd-meta/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>example-app</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

example/example-app/example-app-query/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>example-app</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

example/example-app/example-app-query/src/main/java/com/codingapi/example/app/query/service/FlowAppQueryService.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,21 @@ public Page<FlowRecordEntity> findAllByOperatorId(SearchRequest searchRequest) {
4949
public Page<FlowRecordEntity> findTodoByOperatorId(SearchRequest searchRequest) {
5050
User user = userRepository.getUserByUsername(TokenContext.current().getUsername());
5151
String lastId = searchRequest.getParameter("lastId");
52-
SQLBuilder sqlBuilder = new SQLBuilder("from FlowRecordEntity r where r.currentOperatorId = ?1 and r.flowType = 'TODO' and r.flowStatus = 'RUNNING' ");
52+
SQLBuilder sqlBuilder = new SQLBuilder(
53+
"""
54+
select r from FlowRecordEntity r
55+
LEFT JOIN (select min(m.id) as id from FlowRecordEntity m where m.currentOperatorId = ?1 and m.flowType = 'TODO' and m.flowStatus = 'RUNNING' and m.mergeable = true ) debup
56+
on r.id = debup.id
57+
where r.currentOperatorId = ?1 and r.flowType = 'TODO' and r.flowStatus = 'RUNNING'
58+
and (r.mergeable !=true or debup.id is NOT null )
59+
""",
60+
"""
61+
select count(r) from FlowRecordEntity r
62+
LEFT JOIN (select min(m.id) as id from FlowRecordEntity m where m.currentOperatorId = ?1 and m.flowType = 'TODO' and m.flowStatus = 'RUNNING' and m.mergeable = true ) debup
63+
on r.id = debup.id
64+
where r.currentOperatorId = ?1 and r.flowType = 'TODO' and r.flowStatus = 'RUNNING'
65+
and (r.mergeable !=true or debup.id is NOT null )
66+
""");
5367
sqlBuilder.addParam(user.getId());
5468
if(StringUtils.hasText(lastId)){
5569
sqlBuilder.append(" and r.id < ?",Long.parseLong(lastId));

example/example-app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>springboot-example</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212
<packaging>pom</packaging>

example/example-domain/example-domain-leave/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>example-domain</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

example/example-domain/example-domain-user/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>example-domain</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

example/example-domain/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>springboot-example</artifactId>
8-
<version>3.3.70</version>
8+
<version>3.4.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>

example/example-infra/example-infra-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>example-infra</artifactId>
8-
<version>3.3.70</version>
8+
<version>3.4.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

example/example-infra/example-infra-flow/src/main/java/com/codingapi/example/infra/flow/convert/FlowNodeConvertor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public static FlowNodeEntity convert(FlowNode flowNode, long workId){
2121
entity.setCode(flowNode.getCode());
2222
entity.setName(flowNode.getName());
2323
entity.setEditable(flowNode.isEditable());
24+
entity.setMergeable(flowNode.isMergeable());
2425
entity.setCreateTime(flowNode.getCreateTime());
2526
entity.setType(flowNode.getType().name());
2627
entity.setTimeout(flowNode.getTimeout());
@@ -52,6 +53,7 @@ public static FlowNode convert(FlowNodeEntity entity){
5253
ApprovalType.parser(entity.getApprovalType()),
5354
new OperatorMatcher(entity.getOperatorMatcher()),
5455
entity.getEditable(),
56+
entity.getMergeable(),
5557
entity.getCreateTime(),
5658
entity.getUpdateTime(),
5759
entity.getTimeout(),

example/example-infra/example-infra-flow/src/main/java/com/codingapi/example/infra/flow/convert/FlowRecordConvertor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public static FlowRecordEntity convert(FlowRecord flowRecord) {
2121
entity.setWorkId(flowRecord.getWorkId());
2222
entity.setProcessId(flowRecord.getProcessId());
2323
entity.setNodeCode(flowRecord.getNodeCode());
24+
entity.setMergeable(flowRecord.isMergeable());
2425
entity.setTitle(flowRecord.getTitle());
2526
entity.setCurrentOperatorId(flowRecord.getCurrentOperator().getUserId());
2627
entity.setFlowType(flowRecord.getFlowType().name());
@@ -71,6 +72,7 @@ public static FlowRecord convert(FlowRecordEntity entity, FlowOperatorRepository
7172
flowRecord.setWorkId(entity.getWorkId());
7273
flowRecord.setProcessId(entity.getProcessId());
7374
flowRecord.setNodeCode(entity.getNodeCode());
75+
flowRecord.setMergeable(entity.getMergeable());
7476
flowRecord.setTitle(entity.getTitle());
7577
flowRecord.setCurrentOperator(flowUserRepository.getFlowOperatorById(entity.getCurrentOperatorId()));
7678
flowRecord.setFlowType(FlowType.parser(entity.getFlowType()));

example/example-infra/example-infra-flow/src/main/java/com/codingapi/example/infra/flow/entity/FlowNodeEntity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ public class FlowNodeEntity {
6767
*/
6868
private Boolean editable;
6969

70+
/**
71+
* 是否合并审批
72+
*/
73+
private Boolean mergeable;
74+
7075
/**
7176
* 创建时间
7277
*/

example/example-infra/example-infra-flow/src/main/java/com/codingapi/example/infra/flow/entity/FlowRecordEntity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public class FlowRecordEntity {
4141
*/
4242
private String nodeCode;
4343

44+
/**
45+
* 是否可合并
46+
*/
47+
private Boolean mergeable;
48+
4449
/**
4550
* 流程标题
4651
*/

example/example-infra/example-infra-flow/src/main/java/com/codingapi/example/infra/flow/jpa/FlowRecordEntityRepository.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,17 @@ public interface FlowRecordEntityRepository extends FastRepository<FlowRecordEnt
2323
@Query(value = "select r from FlowRecordEntity r where r.flowType = 'TODO' and r.flowStatus = 'RUNNING' and r.processId = ?1")
2424
List<FlowRecordEntity> findTodoFlowRecordByProcessId(String processId);
2525

26-
@Query(value = "select r from FlowRecordEntity r where r.currentOperatorId = ?1 and r.flowType = 'TODO' and r.flowStatus = 'RUNNING' order by r.id desc")
26+
@Query(value = "select r from FlowRecordEntity r" +
27+
" LEFT JOIN (select min(m.id) as id from FlowRecordEntity m where m.currentOperatorId = ?1 and m.flowType = 'TODO' and m.flowStatus = 'RUNNING' and m.mergeable = true ) debup " +
28+
"on r.id = debup.id" +
29+
" where r.currentOperatorId = ?1 and r.flowType = 'TODO' and r.flowStatus = 'RUNNING'" +
30+
" and (r.mergeable !=true or debup.id is NOT null ) order by r.id desc")
2731
Page<FlowRecordEntity> findTodoByOperatorId(long operatorId, PageRequest pageRequest);
2832

33+
@Query(value = "select r from FlowRecordEntity r where r.currentOperatorId = ?1 and r.workCode = ?2 and r.nodeCode = ?3" +
34+
" and r.mergeable = true and r.flowType = 'TODO' and r.flowStatus = 'RUNNING' order by r.id desc")
35+
List<FlowRecordEntity> findMergeFlowRecordById(long currentOperatorId,String workCode, String nodeCode);
36+
2937
@Query(value = "select r from FlowRecordEntity r where r.currentOperatorId = ?1 and r.workCode = ?2 and r.flowType = 'TODO' and r.flowStatus = 'RUNNING' order by r.id desc")
3038
Page<FlowRecordEntity> findTodoByOperatorIdAndWorkCode(long operatorId, String workCode, PageRequest pageRequest);
3139

example/example-infra/example-infra-flow/src/main/java/com/codingapi/example/infra/flow/repository/FlowRecordRepositoryImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public List<FlowRecord> findFlowRecordByProcessId(String processId) {
4848
return flowRecordEntityRepository.findFlowRecordEntityByProcessId(processId).stream().map(item->FlowRecordConvertor.convert(item,flowOperatorRepository)).toList();
4949
}
5050

51+
@Override
52+
public List<FlowRecord> findMergeFlowRecordById(String workCode, String nodeCode, long currentOperatorId) {
53+
return flowRecordEntityRepository.findMergeFlowRecordById(currentOperatorId,workCode,nodeCode).stream().map(item->FlowRecordConvertor.convert(item,flowOperatorRepository)).toList();
54+
}
55+
5156
@Override
5257
public List<FlowRecord> findTodoFlowRecordByProcessId(String processId) {
5358
return flowRecordEntityRepository.findTodoFlowRecordByProcessId(processId)

example/example-infra/example-infra-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>example-infra</artifactId>
8-
<version>3.3.70</version>
8+
<version>3.4.1</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

example/example-infra/example-infra-security/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>example-infra</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

example/example-infra/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>springboot-example</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212
<packaging>pom</packaging>

example/example-interface/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>springboot-example</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
</parent>
1111

1212
<artifactId>example-interface</artifactId>

example/example-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.70</version>
8+
<version>3.4.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</parent>
2020

2121
<artifactId>springboot-example</artifactId>
22-
<version>3.3.70</version>
22+
<version>3.4.1</version>
2323

2424
<name>springboot-example</name>
2525
<description>springboot-example project for Spring Boot</description>

mobile-ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"private": true,
55
"dependencies": {
66
"@babel/standalone": "^7.25.6",
7-
"@codingapi/flow-mobile": "^0.0.38",
8-
"@codingapi/form-mobile": "^0.0.38",
9-
"@codingapi/ui-framework": "^0.0.38",
7+
"@codingapi/flow-mobile": "^0.0.39",
8+
"@codingapi/form-mobile": "^0.0.39",
9+
"@codingapi/ui-framework": "^0.0.39",
1010
"@logicflow/core": "^2.0.10",
1111
"@logicflow/extension": "^2.0.14",
1212
"@reduxjs/toolkit": "^2.2.7",

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<groupId>com.codingapi.springboot</groupId>
1414
<artifactId>springboot-parent</artifactId>
15-
<version>3.3.70</version>
15+
<version>3.4.1</version>
1616

1717
<url>https://github.com/codingapi/springboot-framewrok</url>
1818
<name>springboot-parent</name>

springboot-starter-data-authorization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>springboot-parent</artifactId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-data-authorization</artifactId>

springboot-starter-data-fast/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.70</version>
8+
<version>3.4.1</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-data-fast/src/main/java/com/codingapi/springboot/fast/jpa/SQLBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public SQLBuilder(String sql) {
1919
this(null, sql, "select count(1) from " + sql);
2020
}
2121

22+
public SQLBuilder(String sql,String countSql) {
23+
this(null, sql, countSql);
24+
}
25+
2226
public SQLBuilder(Class<?> clazz, String sql) {
2327
this(clazz, sql, "select count(1) from " + sql);
2428
}

springboot-starter-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>3.3.70</version>
9+
<version>3.4.1</version>
1010
</parent>
1111

1212
<name>springboot-starter-flow</name>

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/build/FlowWorkBuilder.java

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,43 +73,47 @@ public FlowWork build() {
7373

7474
public class Nodes {
7575

76-
public Nodes node(String id, String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, long timeout, TitleGenerator titleGenerator, ErrTrigger errTrigger, boolean editable, List<FlowButton> buttons) {
77-
FlowNode node = new FlowNode(id, name, code, view, NodeType.parser(code), approvalType, titleGenerator, operatorMatcher, timeout, errTrigger, editable, buttons);
76+
public Nodes node(String id, String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, long timeout, TitleGenerator titleGenerator, ErrTrigger errTrigger, boolean editable, boolean mergeable, List<FlowButton> buttons) {
77+
FlowNode node = new FlowNode(id, name, code, view, NodeType.parser(code), approvalType, titleGenerator, operatorMatcher, timeout, errTrigger, editable,mergeable, buttons);
7878
work.addNode(node);
7979
return this;
8080
}
8181

8282
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, long timeout, boolean editable) {
83-
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, timeout, TitleGenerator.defaultTitleGenerator(), null, editable, null);
83+
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, timeout, TitleGenerator.defaultTitleGenerator(), null, editable,false, null);
8484
}
8585

86-
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, long timeout, boolean editable, List<FlowButton> buttons) {
87-
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, timeout, TitleGenerator.defaultTitleGenerator(), null, editable, buttons);
86+
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, long timeout, boolean editable,boolean mergeable) {
87+
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, timeout, TitleGenerator.defaultTitleGenerator(), null, editable,mergeable, null);
88+
}
89+
90+
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, long timeout, boolean editable,boolean mergeable, List<FlowButton> buttons) {
91+
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, timeout, TitleGenerator.defaultTitleGenerator(), null, editable,mergeable, buttons);
8892
}
8993

9094

91-
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, boolean editable) {
92-
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), null, editable, null);
95+
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, boolean editable,boolean mergeable) {
96+
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), null, editable,mergeable, null);
9397
}
9498

95-
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, boolean editable, List<FlowButton> buttons) {
96-
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), null, editable, buttons);
99+
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, boolean editable,boolean mergeable, List<FlowButton> buttons) {
100+
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), null, editable,mergeable, buttons);
97101
}
98102

99103
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, List<FlowButton> buttons) {
100-
return node(name, code, view, approvalType, operatorMatcher, true, buttons);
104+
return node(name, code, view, approvalType, operatorMatcher, true,false, buttons);
101105
}
102106

103107
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher) {
104-
return node(name, code, view, approvalType, operatorMatcher, true, null);
108+
return node(name, code, view, approvalType, operatorMatcher, true,false, null);
105109
}
106110

107-
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, ErrTrigger errTrigger, boolean editable, List<FlowButton> buttons) {
108-
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), errTrigger, editable, buttons);
111+
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, ErrTrigger errTrigger, boolean editable,boolean mergeable, List<FlowButton> buttons) {
112+
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), errTrigger, editable,mergeable, buttons);
109113
}
110114

111-
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, ErrTrigger errTrigger, boolean editable) {
112-
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), errTrigger, editable, null);
115+
public Nodes node(String name, String code, String view, ApprovalType approvalType, OperatorMatcher operatorMatcher, ErrTrigger errTrigger, boolean editable,boolean mergeable) {
116+
return node(RandomGenerator.generateUUID(), name, code, view, approvalType, operatorMatcher, 0, TitleGenerator.defaultTitleGenerator(), errTrigger, editable,mergeable, null);
113117
}
114118

115119

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/build/SchemaReader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ private void loadNodes() {
4848
String titleGenerator = properties.getString("titleGenerator");
4949
String name = properties.getString("name");
5050
boolean editable = properties.getBoolean("editable");
51+
boolean mergeable = properties.getBoolean("mergeable");
5152
String view = properties.getString("view");
5253
String type = properties.getString("type");
5354
String approvalType = properties.getString("approvalType");
@@ -59,7 +60,7 @@ private void loadNodes() {
5960
buttons = properties.getJSONArray("buttons").toJavaList(FlowButton.class);
6061
}
6162
FlowNode flowNode = new FlowNode(id, name, code, view, NodeType.parser(type), ApprovalType.parser(approvalType), new TitleGenerator(titleGenerator),
62-
new OperatorMatcher(operatorMatcher), timeout, StringUtils.hasLength(errTrigger) ? new ErrTrigger(errTrigger) : null, editable, buttons);
63+
new OperatorMatcher(operatorMatcher), timeout, StringUtils.hasLength(errTrigger) ? new ErrTrigger(errTrigger) : null, editable,mergeable, buttons);
6364
flowNodes.add(flowNode);
6465
}
6566
}

0 commit comments

Comments
 (0)