Skip to content

Commit e3a748e

Browse files
committed
Server:APIJSONORM 解决 SQL 函数中参数的 : 被转成 AS;APIJSONBoot:数据库 URI 改为 localhost
1 parent 38678bd commit e3a748e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/demo/server/DemoSQLConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ public String getDBVersion() {
8989
@Override
9090
public String getDBUri() {
9191
if (isMySQL()) {
92-
return "jdbc:mysql://apijson.cn:3306"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000
92+
return "jdbc:mysql://localhost:3306"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000
9393
}
9494
if (isPostgreSQL()) {
9595
return "jdbc:postgresql://localhost:5432/postgres"; //TODO 改成你自己的
9696
}
9797
if (isSQLServer()) {
98-
return "jdbc:jtds:sqlserver://apijson.org:1433/pubs;instance=SQLEXPRESS"; //TODO 改成你自己的
98+
return "jdbc:jtds:sqlserver://localhost:1433/pubs;instance=SQLEXPRESS"; //TODO 改成你自己的
9999
}
100100
if (isOracle()) {
101101
return "jdbc:oracle:thin:@localhost:1521:orcl"; //TODO 改成你自己的

APIJSON-Java-Server/APIJSONORM/src/main/java/zuo/biao/apijson/server/AbstractSQLConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ else if (StringUtil.isName(origin)) {
929929
}
930930

931931
String c = StringUtil.getString(keys);
932-
c = (c.contains(":") == false ? c : c.replaceAll(":", " AS ")) + (StringUtil.isEmpty(joinColumn, true) ? "" : ", " + joinColumn);//不能在这里改,后续还要用到:
932+
c = c + (StringUtil.isEmpty(joinColumn, true) ? "" : ", " + joinColumn);//不能在这里改,后续还要用到:
933933
return isMain() && isDistinct() ? PREFFIX_DISTINCT + c : c;
934934
default:
935935
throw new UnsupportedOperationException(

0 commit comments

Comments
 (0)