Merge remote-tracking branch 'origin/lichang'

This commit is contained in:
TsMask
2024-11-15 16:50:26 +08:00
16 changed files with 104 additions and 473 deletions

View File

@@ -117,6 +117,9 @@ func DefaultDB() *gorm.DB {
// 获取数据源
func DB(source string) *gorm.DB {
if source == "" {
source = config.Get("gorm.defaultDataSourceName").(string)
}
return dbMap[source]
}