'修改qtask相关'

This commit is contained in:
2019-04-22 19:01:59 +08:00
parent ebbd490913
commit e5a4451a7e
23 changed files with 236 additions and 261 deletions

View File

@@ -9,6 +9,7 @@ public class DbKit implements DbSource{
private DbAccount dbAccount;
private DbSource dbSource;
private String catalog;
public DbKit(DbAccount dbAccount) {
this.dbAccount = dbAccount;
@@ -18,6 +19,15 @@ public class DbKit implements DbSource{
throw new IllegalArgumentException(String.format("创建DbKit失败数据库类型[cate:%s]未知", dbAccount.getCate()));
}
}
public DbKit(DbAccount dbAccount, String catalog) {
this.dbAccount = dbAccount;
this.catalog = catalog;
if ("mysql".equalsIgnoreCase(dbAccount.getCate())) {
dbSource = new DbSourceMysql(dbAccount, catalog);
} else {
throw new IllegalArgumentException(String.format("创建DbKit失败数据库类型[cate:%s]未知", dbAccount.getCate()));
}
}
@Override