43
43
* 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
44
44
* @author Lemon
45
45
*/
46
- public class DemoSQLConfig extends APIJSONSQLConfig {
46
+ public class DemoSQLConfig extends APIJSONSQLConfig < Long > {
47
47
48
48
public DemoSQLConfig () {
49
49
super ();
@@ -119,7 +119,7 @@ public String getUserIdKey(String database, String schema, String datasource, St
119
119
tableColumnMap .put ("User" , Arrays .asList (StringUtil .split ("id,sex,name,tag,head,contactIdList,pictureList,date" )));
120
120
// 需要对应方法传参也是这样拼接才行,例如 ColumnUtil.compatInputColumn(column, getSQLDatabase() + "-" + getSQLSchema() + "-" + getTable(), getMethod());
121
121
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
123
123
124
124
// 字段名映射配置 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
125
125
Map <String , Map <String , String >> tableKeyColumnMap = new HashMap <>();
@@ -134,7 +134,7 @@ public String getUserIdKey(String database, String schema, String datasource, St
134
134
// 需要对应方法传参也是这样拼接才行,例如 ColumnUtil.compatInputKey(super.getKey(key), getSQLDatabase() + "-" + getSQLSchema() + "-" + getTable(), getMethod());
135
135
tableKeyColumnMap .put ("MYSQL-sys-Privacy" , privacyKeyColumnMap );
136
136
137
- ColumnUtil .VERSIONED_KEY_COLUMN_MAP .put (null , tableKeyColumnMap );
137
+ ColumnUtil .VERSIONED_KEY_COLUMN_MAP .put (0 , tableKeyColumnMap ); // SortedMap 不允许 key = null
138
138
// 字段名映射配置 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
139
139
140
140
ColumnUtil .init ();
@@ -302,10 +302,12 @@ public String getDBPassword() {
302
302
protected void onGetCrossJoinString (Join j ) throws UnsupportedOperationException {
303
303
// 开启 CROSS JOIN 笛卡尔积联表 super.onGetCrossJoinString(j);
304
304
}
305
+
305
306
@ 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);
308
309
}
310
+
309
311
@ Override
310
312
protected void onJoinComplextRelation (String sql , String quote , Join j , String jt , List <On > onList , On on ) {
311
313
// 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplextRelation(sql, quote, j, jt, onList, on);
0 commit comments