优化代码

This commit is contained in:
刘祥超
2022-03-22 22:11:32 +08:00
parent 30bfbdc01e
commit f958c57984
68 changed files with 148 additions and 148 deletions

View File

@@ -161,7 +161,7 @@ func (this *MetricItemDAO) UpdateItem(tx *dbs.Tx, itemId int64, name string, key
if oldItem == nil {
return nil
}
oldIsPublic := oldItem.IsPublic == 1
oldIsPublic := oldItem.IsPublic
var versionChanged = false
if strings.Join(oldItem.DecodeKeys(), "&") != strings.Join(keys, "&") || types.Int32(oldItem.Period) != period || oldItem.PeriodUnit != periodUnit || oldItem.Value != value {
versionChanged = true