Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions kg-ctl-core/src/main/java/org/kg/ctl/util/TaskUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,18 @@ public static <T> List<T> list(List<T> list, Integer index, Integer totalCount)

public static String getPrefixWithOutUnderLine(String tableName) {
int i = tableName.lastIndexOf("_");
if (i < 0 || !tableName.endsWith("_")) {
if (i < 0) {
return tableName;
} else {
String tableIndex = tableName.substring(i + 1);
// 确保一定是分表
try {
Integer.parseInt(tableIndex);
} catch (NumberFormatException e) {
return tableName;
}
return tableName.substring(0, i);
}
return tableName.substring(0, i);
}

public static String underLineToCamel(String str) {
Expand Down