code refactor
This commit is contained in:
parent
02dd70480d
commit
e89760f374
|
@ -36,12 +36,16 @@ func (t *Target) Add() error {
|
|||
return Insert(t)
|
||||
}
|
||||
|
||||
if obj.Cluster != t.Cluster {
|
||||
return DB().Model(&Target{}).Where("ident = ?", t.Ident).Updates(map[string]interface{}{
|
||||
"cluster": t.Cluster,
|
||||
"update_at": t.UpdateAt,
|
||||
}).Error
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Target) FillGroup(cache map[int64]*BusiGroup) error {
|
||||
if t.GroupId <= 0 {
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue