feature(web): 增加压缩结果显示
This commit is contained in:
@@ -48,7 +48,8 @@ public class SqlBuilderTests {
|
||||
String alias,
|
||||
String order,
|
||||
String direction,
|
||||
ImmutableList<Boolean> filterCompletes
|
||||
ImmutableList<Boolean> filterCompletes,
|
||||
boolean limited
|
||||
) {
|
||||
int limit = Math.max(count, 1);
|
||||
int offset = limit * Math.max(page - 1, 0);
|
||||
@@ -78,7 +79,7 @@ public class SqlBuilderTests {
|
||||
.whereNotNull(filterCompletes.anySatisfy(b -> b), column(m2, "type"))
|
||||
.orNull(filterCompletes.anySatisfy(b -> !b), column(m2, "type"))
|
||||
.orderBy(StrUtil.isNotBlank(order) && StrUtil.isNotBlank(direction), StrUtil.format("m1.{} {}", order, direction))
|
||||
.limit(offset, count);
|
||||
.limit(limited, offset, count);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -95,12 +96,13 @@ public class SqlBuilderTests {
|
||||
"m2.update_time as finished_time"
|
||||
),
|
||||
1,
|
||||
100,
|
||||
1542097996099055616L,
|
||||
"acct_acct_item_fs",
|
||||
"update_time",
|
||||
"asc",
|
||||
Lists.immutable.of(false, true)
|
||||
10,
|
||||
1542097983881048064L,
|
||||
"conf_center_balance_type",
|
||||
null,
|
||||
null,
|
||||
Lists.immutable.of(false),
|
||||
true
|
||||
).build()
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user