|
@@ -185,6 +185,27 @@ func InitBaseIndexData(dataPath string) {
|
|
|
}
|
|
|
}
|
|
|
fmt.Println("add index success:" + indexCode)
|
|
|
+
|
|
|
+ //刷新指标
|
|
|
+ {
|
|
|
+ switch source {
|
|
|
+ case "wind", "万得":
|
|
|
+ method = "wind/refresh"
|
|
|
+ case "ths", "同花顺":
|
|
|
+ method = "ths/refresh"
|
|
|
+ case "彭博":
|
|
|
+ method = "pb/refresh"
|
|
|
+ case "":
|
|
|
+
|
|
|
+ }
|
|
|
+ if method != `` {
|
|
|
+ refreshMap := make(map[string]interface{})
|
|
|
+ refreshMap["EdbInfoId"] = indexResp.Data.EdbInfoId
|
|
|
+ refreshMap["EdbCode"] = indexCode
|
|
|
+ refreshMap["StartDate"] = "1990-01-01"
|
|
|
+ PostEdbLib(refreshMap, method)
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
fmt.Println("data is empty")
|
|
|
fmt.Println(classifyFirst, classifySecond, classifyThree, indexCode, indexName, frequency, unit, source)
|