Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
兼容mysql8
Browse files Browse the repository at this point in the history
  • Loading branch information
binking338 committed Aug 8, 2024
1 parent 3018050 commit 17e23ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 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>io.github.netcorepal</groupId>
<artifactId>cap4j-ddd-codegen-maven-plugin</artifactId>
<version>1.0.0-alpha</version>
<version>1.0.0-alpha1</version>

<packaging>maven-plugin</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigInteger;
import java.sql.*;
import java.util.*;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -313,7 +312,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
for (Map<String, Object> table :
tables) {
List<Map<String, Object>> tableColumns = columns.stream().filter(col -> col.get("TABLE_NAME").equals(table.get("TABLE_NAME")))
.sorted((a, b) -> ((BigInteger) a.get("ORDINAL_POSITION")).subtract((BigInteger) b.get("ORDINAL_POSITION")).intValue())
.sorted((a, b) -> (Integer.parseInt(a.get("ORDINAL_POSITION").toString()))- Integer.parseInt( b.get("ORDINAL_POSITION").toString()))
.collect(Collectors.toList());
TableMap.put(MysqlSchemaUtils.getTableName(table), table);
ColumnsMap.put(MysqlSchemaUtils.getTableName(table), tableColumns);
Expand Down

0 comments on commit 17e23ba

Please sign in to comment.