Skip to content

Commit

Permalink
修改版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
XUANXUQAQ committed Sep 26, 2023
1 parent e77a51d commit f466184
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>github.fileengine</groupId>
<artifactId>File-Engine</artifactId>
<version>4.2</version>
<version>4.3</version>
<repositories>
<repository>
<id>mulesoft</id>
Expand Down
31 changes: 18 additions & 13 deletions src/main/java/file/engine/services/utils/connection/SQLiteUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -414,24 +414,29 @@ private static void createPriorityTable() throws SQLException {
try (Statement statement = getStatement("cache")) {
int row = statement.executeUpdate("CREATE TABLE IF NOT EXISTS priority(SUFFIX text unique, PRIORITY INT);");
if (row == 0) {
int count = 10;
HashMap<String, Integer> map = new HashMap<>();
map.put("lnk", count--);
map.put("exe", count--);
map.put("bat", count--);
map.put("cmd", count--);
map.put("txt", count--);
map.put("docx", count--);
map.put("zip", count--);
map.put("rar", count--);
map.put("7z", count--);
map.put("html", count);
map.put("defaultPriority", 0);
HashMap<String, Integer> map = generateSuffixPriorityMap();
insertAllSuffixPriority(map, statement);
}
}
}

private static HashMap<String, Integer> generateSuffixPriorityMap() {
int count = 10;
HashMap<String, Integer> map = new HashMap<>();
map.put("lnk", count--);
map.put("exe", count--);
map.put("bat", count--);
map.put("cmd", count--);
map.put("txt", count--);
map.put("docx", count--);
map.put("zip", count--);
map.put("rar", count--);
map.put("7z", count--);
map.put("html", count);
map.put("defaultPriority", 0);
return map;
}

private static void createCacheTable() throws SQLException {
try (PreparedStatement pStmt = getPreparedStatement("CREATE TABLE IF NOT EXISTS cache(PATH text unique);", "cache")) {
pStmt.executeUpdate();
Expand Down

0 comments on commit f466184

Please sign in to comment.