Browse Source

fix:自有数据不回推给象屿

Roc 9 months ago
parent
commit
bad5e57d45
2 changed files with 13 additions and 0 deletions
  1. 12 0
      services/eta_bridge/handle_data.go
  2. 1 0
      utils/constants.go

+ 12 - 0
services/eta_bridge/handle_data.go

@@ -58,6 +58,10 @@ func handleInsert(edbUpdateLog *data_manage.EdbUpdateLog) (pushIndexData *PushIn
 		if edbInfo.EdbType == 2 {
 			return
 		}
+		// 自有数据不处理
+		if edbInfo.Source == utils.DATA_SOURCE_BUSINESS {
+			return
+		}
 
 		// 获取数据源中指标的基础信息
 		origInfo := getOrigInfo(edbInfo.Source, edbInfo.SubSource, edbInfo.EdbCode, edbInfo.EdbName)
@@ -192,6 +196,10 @@ func handleDelete(edbUpdateLog *data_manage.EdbUpdateLog) (pushIndexData *PushIn
 		if edbInfo.EdbType == 2 {
 			return
 		}
+		// 自有数据不处理
+		if edbInfo.Source == utils.DATA_SOURCE_BUSINESS {
+			return
+		}
 
 		// 获取数据源中指标的基础信息
 		origInfo := getOrigInfo(edbInfo.Source, edbInfo.SubSource, edbInfo.EdbCode, edbInfo.EdbName)
@@ -327,6 +335,10 @@ func handleUpdate(edbUpdateLog *data_manage.EdbUpdateLog) (pushIndexData *PushIn
 		if oldEdbInfo.EdbType == 2 {
 			return
 		}
+		// 自有数据不处理
+		if oldEdbInfo.Source == utils.DATA_SOURCE_BUSINESS {
+			return
+		}
 
 		var newEdbInfo *data_manage.EdbInfoItem
 		err = json.Unmarshal([]byte(newData), &newEdbInfo)

+ 1 - 0
utils/constants.go

@@ -104,6 +104,7 @@ const (
 	DATA_SOURCE_GFEX                                 = 78       // 广州期货交易所->78
 	DATA_SOURCE_ICPI                                 = 79       // ICPI消费价格指数->79
 	DATA_SOURCE_BLOOMBERG                            = 83       // bloomberg彭博数据
+	DATA_SOURCE_BUSINESS                             = 84       // 来源于自有数据
 )
 
 // 数据刷新频率