Skip to content

Commit

Permalink
Java:MultiDataSource 补充泛型
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLemon committed Dec 17, 2023
1 parent 941a2bb commit f8ca8af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public JSONObject parseResponse(JSONObject request) {
}

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

@Override
public JSONObject executeSQL(SQLConfig config, boolean isSubquery) throws Exception {
public JSONObject executeSQL(SQLConfig<Long> config, boolean isSubquery) throws Exception {
if (asDBAccount && config instanceof DemoSQLConfig) {
DemoSQLConfig cfg = (DemoSQLConfig) config;
if (StringUtil.isEmpty(cfg.getDBAccount())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class DemoVerifier extends APIJSONRouterVerifier<Long> { // APIJSONVerif

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

Expand Down

0 comments on commit f8ca8af

Please sign in to comment.