refactor: 数据同步优化, base.App、base.Repo新增Save方法

This commit is contained in:
meilin.huang
2024-01-07 21:46:25 +08:00
parent eea759e10e
commit af454f7d5d
19 changed files with 141 additions and 109 deletions

View File

@@ -23,7 +23,7 @@ import (
type Machine interface {
base.App[*entity.Machine]
Save(ctx context.Context, m *entity.Machine, tagIds ...uint64) error
SaveMachine(ctx context.Context, m *entity.Machine, tagIds ...uint64) error
// 测试机器连接
TestConn(me *entity.Machine) error
@@ -74,7 +74,7 @@ func (m *machineAppImpl) GetMachineList(condition *entity.MachineQuery, pagePara
return m.GetRepo().GetMachineList(condition, pageParam, toEntity, orderBy...)
}
func (m *machineAppImpl) Save(ctx context.Context, me *entity.Machine, tagIds ...uint64) error {
func (m *machineAppImpl) SaveMachine(ctx context.Context, me *entity.Machine, tagIds ...uint64) error {
oldMachine := &entity.Machine{
Ip: me.Ip,
Port: me.Port,