1
mirror of https://github.com/CarmJos/EasyPlugin.git synced 2026-06-05 00:58:17 +08:00

feat(users): Seperated users registry interface for api usage.

This commit is contained in:
2025-05-17 03:44:07 +08:00
parent bc3dd32f85
commit 54939f0f14
21 changed files with 219 additions and 97 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>easyplugin-parent</artifactId>
<groupId>cc.carm.lib</groupId>
<version>1.5.12</version>
<version>1.5.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+21
View File
@@ -0,0 +1,21 @@
import org.junit.Test;
public class PageTest {
@Test
public void test() {
System.out.println(maxPage(0, 10));
System.out.println(maxPage(10, 10));
System.out.println(maxPage(5, 10));
System.out.println(maxPage(15, 10));
System.out.println(maxPage(19, 10));
System.out.println(maxPage(20, 10));
}
int maxPage(int contents, int size) {
if (contents == 0 || size == 0) return 1;
return (contents / size) + ((contents % size) == 0 ? 0 : 1);
}
}