修改: 移除 BaseService 中的冗余search_path 设置代码并更新 redkale 依赖版本

This commit is contained in:
绝尘 2025-06-20 22:40:03 +08:00
parent 92c009cde6
commit 4fd53fe434
2 changed files with 5 additions and 9 deletions

View File

@ -25,7 +25,7 @@
<dependency>
<groupId>org.redkale</groupId>
<artifactId>redkale</artifactId>
<version>2.2.0</version>
<version>2.2.250620</version>
</dependency>
<dependency>

View File

@ -1,19 +1,15 @@
package com.zchd.base;
import com.zchd.base.util.Utils;
import net.tccn.zhub.ZHubClient;
import org.redkale.convert.json.JsonConvert;
import org.redkale.service.AbstractService;
import org.redkale.service.RetResult;
import org.redkale.source.DataJdbcSource;
import org.redkale.source.DataSource;
import org.redkale.source.PoolSource;
import org.redkale.util.AnyValue;
import org.redkale.util.Sheet;
import javax.annotation.Resource;
import java.io.File;
import java.sql.Connection;
import java.util.List;
import java.util.logging.Logger;
@ -48,7 +44,7 @@ public class BaseService extends AbstractService {
@Override
public void init(AnyValue config) {
PoolSource<Connection> source = ((DataJdbcSource) zimSource).getReadPoolSource();
/*PoolSource<Connection> source = ((DataJdbcSource) zimSource).getReadPoolSource();
// postgresql 设置当前schema
if ("postgresql".equals(source.getDbtype())) {
String url = source.getUrl();
@ -57,7 +53,7 @@ public class BaseService extends AbstractService {
schema = "public";
}
((DataJdbcSource) zimSource).directExecute(String.format("SET search_path TO %s;", schema));
}
}*/
}
protected RetResult retError(String info) {
@ -74,7 +70,7 @@ public class BaseService extends AbstractService {
* @param url
* @return
*/
protected String getCurrentSchema(String url) {
/*protected String getCurrentSchema(String url) {
String[] arr = url.split("currentSchema=");
if (arr.length > 1) {
String[] arr2 = arr[1].split("&");
@ -83,5 +79,5 @@ public class BaseService extends AbstractService {
}
}
return "";
}
}*/
}