Skip to content

Commit b9023b1

Browse files
author
piexlmax
committed
Merge remote-tracking branch 'origin/main'
2 parents 08a1804 + afaca23 commit b9023b1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

server/config/db_list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ type GeneralDB struct {
1212
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
1313
Port string `mapstructure:"port" json:"port" yaml:"port"` //:端口
1414
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
15+
AliasName string `mapstructure:"alias-name" json:"alias-name" yaml:"alias-name"` // 在多数据库中 生效
1516
Dbname string `mapstructure:"db-name" json:"db-name" yaml:"db-name"` // 数据库名
1617
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
1718
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码

server/initialize/db_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ func DBList() {
1616
}
1717
switch info.Type {
1818
case "mysql":
19-
dbMap[info.GeneralDB.Dbname] = GormMysqlByConfig(config.Mysql{GeneralDB: info.GeneralDB})
19+
dbMap[info.GeneralDB.AliasName] = GormMysqlByConfig(config.Mysql{GeneralDB: info.GeneralDB})
2020
case "pgsql":
21-
dbMap[info.GeneralDB.Dbname] = GormPgSqlByConfig(config.Pgsql{GeneralDB: info.GeneralDB})
21+
dbMap[info.GeneralDB.AliasName] = GormPgSqlByConfig(config.Pgsql{GeneralDB: info.GeneralDB})
2222
default:
2323
continue
2424
}

server/source/system/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (i *initApi) InitializeData(ctx context.Context) (context.Context, error) {
8686
{ApiGroup: "菜单", Method: "POST", Path: "/menu/getMenuAuthority", Description: "获取指定角色menu"},
8787
{ApiGroup: "菜单", Method: "POST", Path: "/menu/addMenuAuthority", Description: "增加menu和角色关联关系"},
8888

89-
{ApiGroup: "分片上传", Method: "POST", Path: "/fileUploadAndDownload/findFile", Description: "寻找目标文件(秒传)"},
89+
{ApiGroup: "分片上传", Method: "GET", Path: "/fileUploadAndDownload/findFile", Description: "寻找目标文件(秒传)"},
9090
{ApiGroup: "分片上传", Method: "POST", Path: "/fileUploadAndDownload/breakpointContinue", Description: "断点续传"},
9191
{ApiGroup: "分片上传", Method: "POST", Path: "/fileUploadAndDownload/breakpointContinueFinish", Description: "断点续传完成"},
9292
{ApiGroup: "分片上传", Method: "POST", Path: "/fileUploadAndDownload/removeChunk", Description: "上传完成移除文件"},

0 commit comments

Comments
 (0)