mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-27 01:46:35 +08:00
refactor: 数据同步优化, base.App、base.Repo新增Save方法
This commit is contained in:
@@ -21,7 +21,7 @@ type Mongo interface {
|
||||
|
||||
TestConn(entity *entity.Mongo) error
|
||||
|
||||
Save(ctx context.Context, entity *entity.Mongo, tagIds ...uint64) error
|
||||
SaveMongo(ctx context.Context, entity *entity.Mongo, tagIds ...uint64) error
|
||||
|
||||
// 删除数据库信息
|
||||
Delete(ctx context.Context, id uint64) error
|
||||
@@ -76,7 +76,7 @@ func (d *mongoAppImpl) TestConn(me *entity.Mongo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *mongoAppImpl) Save(ctx context.Context, m *entity.Mongo, tagIds ...uint64) error {
|
||||
func (d *mongoAppImpl) SaveMongo(ctx context.Context, m *entity.Mongo, tagIds ...uint64) error {
|
||||
oldMongo := &entity.Mongo{Name: m.Name, SshTunnelMachineId: m.SshTunnelMachineId}
|
||||
err := d.GetBy(oldMongo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user