Skip to content

Commit f8ca8af

Browse files
committed
Java:MultiDataSource 补充泛型
1 parent 941a2bb commit f8ca8af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public JSONObject parseResponse(JSONObject request) {
9191
}
9292

9393
@Override
94-
public APIJSONObjectParser createObjectParser(JSONObject request, String parentPath, SQLConfig arrayConfig
94+
public APIJSONObjectParser<Long> createObjectParser(JSONObject request, String parentPath, SQLConfig<Long> arrayConfig
9595
, boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception {
9696
return new DemoObjectParser(getSession(), request, parentPath, arrayConfig
9797
, isSubquery, isTable, isArrayMainTable).setMethod(getMethod()).setParser(this);
@@ -117,7 +117,7 @@ public APIJSONParser<Long> setSession(HttpSession session) {
117117
}
118118

119119
@Override
120-
public JSONObject executeSQL(SQLConfig config, boolean isSubquery) throws Exception {
120+
public JSONObject executeSQL(SQLConfig<Long> config, boolean isSubquery) throws Exception {
121121
if (asDBAccount && config instanceof DemoSQLConfig) {
122122
DemoSQLConfig cfg = (DemoSQLConfig) config;
123123
if (StringUtil.isEmpty(cfg.getDBAccount())) {

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoVerifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class DemoVerifier extends APIJSONRouterVerifier<Long> { // APIJSONVerif
3737

3838
// 重写方法来自定义字段名等
3939
// @Override
40-
// public String getVisitorIdKey(SQLConfig config) {
40+
// public String getVisitorIdKey(SQLConfig<Long> config) {
4141
// return super.getVisitorIdKey(config); // return "userid"; // return "uid" 等自定义的字段名
4242
// }
4343

0 commit comments

Comments
 (0)