feat:完善信息

This commit is contained in:
henry
2022-01-24 17:29:02 +08:00
parent 1c0d9dfb6b
commit 26b58e3ca6
6 changed files with 38 additions and 7 deletions

View File

@ -38,10 +38,10 @@ type (
}
// InstanceParams 参数信息
InstanceParams struct {
ID uint64
Name, Domain, Remark string
Area config.Area
Contact, ContactMobile string
ID uint64
Name, Domain, IP, Remark string
Area config.Area
Contact, ContactMobile string
}
)
@ -118,6 +118,9 @@ func (c *Instance) Form(params *InstanceParams) error {
isExist := false
if !utils.ValidateIP(params.IP) {
return errors.New("操作错误IP地址异常")
}
if params.ID > 0 {
mSysTenant.ID = params.ID
@ -143,6 +146,7 @@ func (c *Instance) Form(params *InstanceParams) error {
Province: params.Area.Province,
City: params.Area.City,
}
mSysTenant.IP = params.IP
mSysTenant.Contact = params.Contact
mSysTenant.ContactMobile = params.ContactMobile
mSysTenant.Remark = params.Remark