fix: 优化数据库连接配置

This commit is contained in:
tangwei 2026-05-11 14:18:21 +08:00
parent aa7f4ac0a0
commit 125ff31f7f
2 changed files with 57 additions and 0 deletions

View File

@ -430,6 +430,31 @@ public class ImportTaskServiceImpl extends ServiceImpl<ImportTaskMapper, ImportT
result.addFailedRow(importRow); result.addFailedRow(importRow);
} }
} }
Map<String, String> imageFiles = new LinkedHashMap<>();
Map<String, String> videoFiles = new LinkedHashMap<>();
for (FishImportResult.FishImportRow row : result.getRows()) {
if (row.getPicpthList() != null) {
for (Map<String, String> pic : row.getPicpthList()) {
String name = pic.get("name");
String path = pic.get("path");
if (name != null && path != null) {
imageFiles.putIfAbsent(name, path);
}
}
}
if (row.getVdpthList() != null) {
for (Map<String, String> vid : row.getVdpthList()) {
String name = vid.get("name");
String path = vid.get("path");
if (name != null && path != null) {
videoFiles.putIfAbsent(name, path);
}
}
}
}
result.setImageFiles(imageFiles);
result.setVideoFiles(videoFiles);
} }
return result; return result;

View File

@ -13,11 +13,43 @@ spring:
url: "${DB_MASTER_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}" url: "${DB_MASTER_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}"
username: "${DB_MASTER_USERNAME:QGC_REFA}" username: "${DB_MASTER_USERNAME:QGC_REFA}"
password: "${DB_MASTER_PASSWORD:Y4M4K1oCkL8U}" password: "${DB_MASTER_PASSWORD:Y4M4K1oCkL8U}"
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
keep-alive-between-time-millis: 120000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
keep-alive: true
remove-abandoned: true
remove-abandoned-timeout: 1800
log-abandoned: true
connection-properties: oracle.net.CONNECT_TIMEOUT=10000;oracle.jdbc.ReadTimeout=30000
slave: slave:
driverClassName: oracle.jdbc.OracleDriver driverClassName: oracle.jdbc.OracleDriver
url: "${DB_SLAVE_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}" url: "${DB_SLAVE_URL:jdbc:oracle:thin:@172.16.21.134:1521/SDLYZ}"
username: "${DB_SLAVE_USERNAME:QGC_REFA}" username: "${DB_SLAVE_USERNAME:QGC_REFA}"
password: "${DB_SLAVE_PASSWORD:Y4M4K1oCkL8U}" password: "${DB_SLAVE_PASSWORD:Y4M4K1oCkL8U}"
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
keep-alive: true
keep-alive-between-time-millis: 120000
time-between-eviction-runs-millis: 60000
remove-abandoned: true
remove-abandoned-timeout: 1800
log-abandoned: true
connection-properties: oracle.net.CONNECT_TIMEOUT=10000;oracle.jdbc.ReadTimeout=30000
jackson: jackson:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss