mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-25 09:06:34 +08:00
feat: 项目与资源强校验&更新静态文件
This commit is contained in:
@@ -131,7 +131,7 @@ func (da *dbAppImpl) GetDbInstance(id uint64) *DbInstance {
|
||||
// 设置闲置连接数
|
||||
DB.SetMaxIdleConns(1)
|
||||
|
||||
dbi := &DbInstance{Id: id, Type: d.Type, db: DB}
|
||||
dbi := &DbInstance{Id: id, Type: d.Type, ProjectId: d.ProjectId, db: DB}
|
||||
if needCache {
|
||||
dbCache.Put(id, dbi)
|
||||
}
|
||||
@@ -166,9 +166,10 @@ func TestConnection(d *entity.Db) {
|
||||
|
||||
// db实例
|
||||
type DbInstance struct {
|
||||
Id uint64
|
||||
Type string
|
||||
db *sql.DB
|
||||
Id uint64
|
||||
Type string
|
||||
ProjectId uint64
|
||||
db *sql.DB
|
||||
}
|
||||
|
||||
// 执行查询语句
|
||||
|
||||
Reference in New Issue
Block a user