Skip to content

Commit a6c49df

Browse files
committed
add Response empty
1 parent 1630c0b commit a6c49df

File tree

7 files changed

+22
-5
lines changed

7 files changed

+22
-5
lines changed

pom.xml

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

1212
<groupId>com.codingapi.springboot</groupId>
1313
<artifactId>springboot-parent</artifactId>
14-
<version>0.1.0</version>
14+
<version>0.1.1</version>
1515

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

springboot-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.codingapi.springboot</groupId>
66
<artifactId>springboot-parent</artifactId>
7-
<version>0.1.0</version>
7+
<version>0.1.1</version>
88
</parent>
99
<artifactId>springboot-example</artifactId>
1010

springboot-starter-data-permission/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>0.1.0</version>
9+
<version>0.1.1</version>
1010
</parent>
1111

1212

springboot-starter-security-jwt/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>0.1.0</version>
9+
<version>0.1.1</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-security-jwt</artifactId>

springboot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.codingapi.springboot</groupId>
66
<artifactId>springboot-parent</artifactId>
7-
<version>0.1.0</version>
7+
<version>0.1.1</version>
88
</parent>
99
<artifactId>springboot-starter</artifactId>
1010

springboot-starter/src/main/java/com/codingapi/springboot/framework/dto/response/MultiResponse.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ public static <T> MultiResponse<T> of(Page<T> page) {
3232
}
3333

3434

35+
public static <T> MultiResponse<T> empty() {
36+
MultiResponse<T> multiResponse = new MultiResponse<>();
37+
multiResponse.setSuccess(true);
38+
multiResponse.setData(null);
39+
multiResponse.setTotal(0);
40+
return multiResponse;
41+
}
42+
43+
3544
public static <T> MultiResponse<T> of(Collection<T> data) {
3645
MultiResponse<T> multiResponse = new MultiResponse<>();
3746
multiResponse.setSuccess(true);

springboot-starter/src/main/java/com/codingapi/springboot/framework/dto/response/SingleResponse.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,12 @@ public static <T> SingleResponse<T> of(T data) {
2121
}
2222

2323

24+
public static <T> SingleResponse<T> empty(){
25+
SingleResponse<T> singleResponse = new SingleResponse<>();
26+
singleResponse.setSuccess(true);
27+
singleResponse.setData(null);
28+
return singleResponse;
29+
}
30+
31+
2432
}

0 commit comments

Comments
 (0)