update 重构代码生成 多数据库sql加载 使用xml特性动态切换sql

This commit is contained in:
疯狂的狮子li
2022-03-14 14:05:37 +08:00
parent 1aab88859d
commit 7f1356a447
11 changed files with 288 additions and 1016 deletions

View File

@ -23,7 +23,7 @@ public class DataBaseHelper {
/**
* 获取当前数据库类型
*/
public static DataBaseType getDataBasyType() {
public static DataBaseType getDataBaseType() {
DynamicRoutingDataSource ds = (DynamicRoutingDataSource) SpringUtils.getBean(DataSource.class);
DataSource dataSource = ds.determineDataSource();
try {
@ -36,23 +36,23 @@ public class DataBaseHelper {
}
public static boolean isMySql() {
return DataBaseType.MY_SQL == getDataBasyType();
return DataBaseType.MY_SQL == getDataBaseType();
}
public static boolean isOracle() {
return DataBaseType.ORACLE == getDataBasyType();
return DataBaseType.ORACLE == getDataBaseType();
}
public static boolean isPostgerSql() {
return DataBaseType.POSTGRE_SQL == getDataBasyType();
return DataBaseType.POSTGRE_SQL == getDataBaseType();
}
public static boolean isSqlServer() {
return DataBaseType.SQL_SERVER == getDataBasyType();
return DataBaseType.SQL_SERVER == getDataBaseType();
}
public static String findInSet(Object var1, String var2) {
DataBaseType dataBasyType = getDataBasyType();
DataBaseType dataBasyType = getDataBaseType();
String var = Convert.toStr(var1);
if (dataBasyType == DataBaseType.SQL_SERVER) {
// charindex(',100,' , ',0,100,101,') <> 0