Skip to content

Commit 23b5c20

Browse files
committedSep 2, 2023
Java: 所有 Demo 升级 APIJSON 6.2, apijson-framework 6.2, apijson-column 1.7;解决 泛型 及 配置问题
1 parent c503a2c commit 23b5c20

File tree

58 files changed

+220
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+220
-219
lines changed
 

‎APIJSON-Java-Server/APIJSONBoot-BigData/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>apijson.boot</groupId>
77
<artifactId>apijson-boot</artifactId>
8-
<version>6.0.0</version>
8+
<version>6.2.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONBoot-BigData</name>
@@ -36,12 +36,12 @@
3636
<dependency>
3737
<groupId>com.github.TommyLemon</groupId>
3838
<artifactId>unitauto-java</artifactId>
39-
<version>2.7.2</version>
39+
<version>2.9.0</version>
4040
</dependency>
4141
<dependency>
4242
<groupId>com.github.TommyLemon</groupId>
4343
<artifactId>unitauto-jar</artifactId>
44-
<version>2.7.2</version>
44+
<version>2.9.0</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>io.github.classgraph</groupId>
@@ -55,17 +55,17 @@
5555
<dependency>
5656
<groupId>com.github.Tencent</groupId>
5757
<artifactId>APIJSON</artifactId>
58-
<version>6.0.0</version>
58+
<version>6.2.0</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>com.github.APIJSON</groupId>
6262
<artifactId>apijson-framework</artifactId>
63-
<version>6.0.0</version>
63+
<version>6.2.0</version>
6464
</dependency>
6565
<dependency>
6666
<groupId>com.github.APIJSON</groupId>
6767
<artifactId>apijson-column</artifactId>
68-
<version>1.5.0</version>
68+
<version>1.7.0</version>
6969
</dependency>
7070
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 >>>>>>>>>> -->
7171

‎APIJSON-Java-Server/APIJSONBoot-BigData/src/main/java/apijson/demo/DemoSQLConfig.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* https://github.com/Tencent/APIJSON/blob/master/%E8%AF%A6%E7%BB%86%E7%9A%84%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.md#c-1-1%E4%BF%AE%E6%94%B9%E6%95%B0%E6%8D%AE%E5%BA%93%E9%93%BE%E6%8E%A5
4444
* @author Lemon
4545
*/
46-
public class DemoSQLConfig extends APIJSONSQLConfig {
46+
public class DemoSQLConfig extends APIJSONSQLConfig<Long> {
4747

4848
public DemoSQLConfig() {
4949
super();
@@ -119,7 +119,7 @@ public String getUserIdKey(String database, String schema, String datasource, St
119119
tableColumnMap.put("User", Arrays.asList(StringUtil.split("id,sex,name,tag,head,contactIdList,pictureList,date")));
120120
// 需要对应方法传参也是这样拼接才行,例如 ColumnUtil.compatInputColumn(column, getSQLDatabase() + "-" + getSQLSchema() + "-" + getTable(), getMethod());
121121
tableColumnMap.put("MYSQL-sys-Privacy", Arrays.asList(StringUtil.split("id,certified,phone,balance,_password,_payPassword")));
122-
ColumnUtil.VERSIONED_TABLE_COLUMN_MAP.put(null, tableColumnMap);
122+
ColumnUtil.VERSIONED_TABLE_COLUMN_MAP.put(0, tableColumnMap); // SortedMap 不允许 key = null
123123

124124
// 字段名映射配置 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
125125
Map<String, Map<String, String>> tableKeyColumnMap = new HashMap<>();
@@ -134,7 +134,7 @@ public String getUserIdKey(String database, String schema, String datasource, St
134134
// 需要对应方法传参也是这样拼接才行,例如 ColumnUtil.compatInputKey(super.getKey(key), getSQLDatabase() + "-" + getSQLSchema() + "-" + getTable(), getMethod());
135135
tableKeyColumnMap.put("MYSQL-sys-Privacy", privacyKeyColumnMap);
136136

137-
ColumnUtil.VERSIONED_KEY_COLUMN_MAP.put(null, tableKeyColumnMap);
137+
ColumnUtil.VERSIONED_KEY_COLUMN_MAP.put(0, tableKeyColumnMap); // SortedMap 不允许 key = null
138138
// 字段名映射配置 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
139139

140140
ColumnUtil.init();
@@ -302,10 +302,12 @@ public String getDBPassword() {
302302
protected void onGetCrossJoinString(Join j) throws UnsupportedOperationException {
303303
// 开启 CROSS JOIN 笛卡尔积联表 super.onGetCrossJoinString(j);
304304
}
305+
305306
@Override
306-
protected void onJoinNotRelation(String sql, String quote, Join j, String jt, List<On> onList, On on) {
307-
// 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, j, jt, onList, on);
307+
protected void onJoinNotRelation(String sql, String quote, Join join, String table, List<On> onList, On on) {
308+
// 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, join, table, onList, on);
308309
}
310+
309311
@Override
310312
protected void onJoinComplextRelation(String sql, String quote, Join j, String jt, List<On> onList, On on) {
311313
// 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplextRelation(sql, quote, j, jt, onList, on);

0 commit comments

Comments
 (0)
Please sign in to comment.