域名服务增加停用 /启用

This commit is contained in:
刘祥超
2021-07-20 19:03:10 +08:00
parent 7343d4bfac
commit 31c20122b4
3 changed files with 5 additions and 4 deletions

View File

@@ -113,7 +113,7 @@ func (this *NSRecordDAO) CreateRecord(tx *dbs.Tx, domainId int64, description st
}
// UpdateRecord 修改记录
func (this *NSRecordDAO) UpdateRecord(tx *dbs.Tx, recordId int64, description string, name string, dnsType dnsconfigs.RecordType, value string, ttl int32, routeIds []int64) error {
func (this *NSRecordDAO) UpdateRecord(tx *dbs.Tx, recordId int64, description string, name string, dnsType dnsconfigs.RecordType, value string, ttl int32, routeIds []int64, isOn bool) error {
if recordId <= 0 {
return errors.New("invalid recordId")
}
@@ -130,6 +130,7 @@ func (this *NSRecordDAO) UpdateRecord(tx *dbs.Tx, recordId int64, description st
op.Type = dnsType
op.Value = value
op.Ttl = ttl
op.IsOn = isOn
if len(routeIds) == 0 {
op.RouteIds = "[]"