Browse Source

Merge branch 'feature/eta_forum3_chart_classify' into debug

xyxie 1 week ago
parent
commit
a94818bfa5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      services/edb_data.go

+ 2 - 2
services/edb_data.go

@@ -435,7 +435,7 @@ func AddOrUpdateEdbDataWithOpType(edbInfoId int, dataList []*models.EdbDataBaseW
 			}
 		} else {
 			if v.OpType != "delete" {
-				if v.ModifyTime.After(oldObj.ModifyTime) {
+				if v.ModifyTime.After(oldObj.ModifyTime) || oldObj.Value != val {
 					err = mgodb.ModifyValueEdbDataValue(oldObj.EdbDataId, val, v.ModifyTime)
 					if err != nil {
 						err = fmt.Errorf("更新指标数据出错 error, %v", err)
@@ -535,7 +535,7 @@ func AddOrUpdateEdbDataCalculateWithOpType(edbInfoId int, dataList []*models.Edb
 			}
 		} else {
 			if v.OpType != "delete" {
-				if v.ModifyTime.After(oldObj.ModifyTime) {
+				if v.ModifyTime.After(oldObj.ModifyTime) || oldObj.Value != val {
 					err = mgodb.ModifyValueEdbCalculateDataValue(oldObj.EdbDataId, val, v.ModifyTime)
 					if err != nil {
 						err = fmt.Errorf("更新指标数据出错 error, %v", err)