refactor: 操作日志信息完善等

This commit is contained in:
meilin.huang
2022-11-18 17:52:30 +08:00
parent debc34f0fb
commit 480e930385
81 changed files with 509 additions and 2404 deletions

View File

@@ -1,6 +1,7 @@
package entity
import (
"fmt"
"mayfly-go/internal/common/utils"
"mayfly-go/pkg/model"
)
@@ -39,3 +40,8 @@ func (m *Machine) PwdDecrypt() {
// 密码替换为解密后的密码
m.Password = utils.PwdAesDecrypt(m.Password)
}
// 获取记录日志的描述
func (m *Machine) GetLogDesc() string {
return fmt.Sprintf("Machine[id=%d, tag=%s, name=%s, ip=%s:%d]", m.Id, m.TagPath, m.Name, m.Ip, m.Port)
}