mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 00:10:25 +08:00 
			
		
		
		
	refactor: 数据库管理迁移至数据库实例-库管理、机器管理-文件支持用户和组信息查看
This commit is contained in:
		@@ -57,10 +57,20 @@ func (d *Db) Dbs(rc *req.Ctx) {
 | 
			
		||||
	res, err := d.DbApp.GetPageList(queryCond, page, &dbvos)
 | 
			
		||||
	biz.ErrIsNil(err)
 | 
			
		||||
 | 
			
		||||
	// 填充标签信息
 | 
			
		||||
	d.TagApp.FillTagInfo(tagentity.TagTypeDbName, collx.ArrayMap(dbvos, func(dbvo *vo.DbListVO) tagentity.ITagResource {
 | 
			
		||||
		return dbvo
 | 
			
		||||
	})...)
 | 
			
		||||
	instances, _ := d.InstanceApp.GetByIds(collx.ArrayMap(dbvos, func(i *vo.DbListVO) uint64 {
 | 
			
		||||
		return i.InstanceId
 | 
			
		||||
	}))
 | 
			
		||||
	instancesMap := collx.ArrayToMap(instances, func(i *entity.DbInstance) uint64 {
 | 
			
		||||
		return i.Id
 | 
			
		||||
	})
 | 
			
		||||
	for _, dbvo := range dbvos {
 | 
			
		||||
		di := instancesMap[dbvo.InstanceId]
 | 
			
		||||
		if di != nil {
 | 
			
		||||
			dbvo.InstanceType = di.Type
 | 
			
		||||
			dbvo.Host = di.Host
 | 
			
		||||
			dbvo.Port = di.Port
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	rc.ResData = res
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user