Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita28b90f

Browse files
Thomasrludomikula
Thomasr
authored andcommitted
application snapshot history count logic fix
1 parent138ebd8 commita28b90f

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

‎server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/application/service/ApplicationHistorySnapshotService.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public interface ApplicationHistorySnapshotService {
1717
Mono<List<ApplicationHistorySnapshotTS>>listAllHistorySnapshotBriefInfoArchived(StringapplicationId,StringcompName,Stringtheme,Instantfrom,Instantto,PageRequestpageRequest);
1818

1919
Mono<Long>countByApplicationId(StringapplicationId);
20+
Mono<Long>countByApplicationIdArchived(StringapplicationId);
2021

2122
Mono<ApplicationHistorySnapshot>getHistorySnapshotDetail(StringhistorySnapshotId);
2223

‎server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/application/service/impl/ApplicationHistorySnapshotServiceImpl.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ public Mono<Long> countByApplicationId(String applicationId) {
5959
e ->ofException(BizError.FETCH_HISTORY_SNAPSHOT_COUNT_FAILURE,"FETCH_HISTORY_SNAPSHOT_COUNT_FAILURE"));
6060
}
6161

62+
@Override
63+
publicMono<Long>countByApplicationIdArchived(StringapplicationId) {
64+
returnrepositoryArchived.countByApplicationId(applicationId)
65+
.onErrorMap(Exception.class,
66+
e ->ofException(BizError.FETCH_HISTORY_SNAPSHOT_COUNT_FAILURE,"FETCH_HISTORY_SNAPSHOT_COUNT_FAILURE"));
67+
}
68+
6269

6370
@Override
6471
publicMono<ApplicationHistorySnapshot>getHistorySnapshotDetail(StringhistorySnapshotId) {

‎server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/application/ApplicationHistorySnapshotController.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public Mono<ResponseView<Boolean>> create(@RequestBody ApplicationHistorySnapsho
5555

5656
@Override
5757
publicMono<ResponseView<Map<String,Object>>>listAllHistorySnapshotBriefInfo(@PathVariableStringapplicationId,
58-
@RequestParam(defaultValue ="0")intpage,
58+
@RequestParam(defaultValue ="1")intpage,
5959
@RequestParam(defaultValue ="10")intsize,
6060
@RequestParamStringcompName,
6161
@RequestParamStringtheme,
@@ -92,7 +92,7 @@ public Mono<ResponseView<Map<String, Object>>> listAllHistorySnapshotBriefInfo(@
9292

9393
@Override
9494
publicMono<ResponseView<Map<String,Object>>>listAllHistorySnapshotBriefInfoArchived(@PathVariableStringapplicationId,
95-
@RequestParam(defaultValue ="0")intpage,
95+
@RequestParam(defaultValue ="1")intpage,
9696
@RequestParam(defaultValue ="10")intsize,
9797
@RequestParamStringcompName,
9898
@RequestParamStringtheme,
@@ -119,7 +119,7 @@ public Mono<ResponseView<Map<String, Object>>> listAllHistorySnapshotBriefInfoAr
119119
)
120120
);
121121

122-
Mono<Long>applicationHistorySnapshotCount =applicationHistorySnapshotService.countByApplicationId(applicationId);
122+
Mono<Long>applicationHistorySnapshotCount =applicationHistorySnapshotService.countByApplicationIdArchived(applicationId);
123123

124124
returnMono.zip(snapshotBriefInfoList,applicationHistorySnapshotCount)
125125
.map(tuple ->ImmutableMap.of("list",tuple.getT1(),"count",tuple.getT2()));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp