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