|
@@ -2569,8 +2569,9 @@ func EdbInfoAdd(source, classifyId int, edbCode, edbName, frequency, unit, start
|
|
|
if tE != nil {
|
|
|
utils.FileLog.Info(fmt.Sprintf("从缓存中获取数据源终端信息失败, Err: %s", tE))
|
|
|
}
|
|
|
+ var sourceIndexName string
|
|
|
if terminalCode == "" {
|
|
|
- terminalCode, tE = GetTerminalFromBaseIndex(source, edbCode)
|
|
|
+ terminalCode, sourceIndexName, tE = GetTerminalFromBaseIndex(source, edbCode)
|
|
|
if tE != nil {
|
|
|
utils.FileLog.Info(fmt.Sprintf("获取数据源终端信息失败, Err: %s", tE))
|
|
|
}
|
|
@@ -2599,6 +2600,7 @@ func EdbInfoAdd(source, classifyId int, edbCode, edbName, frequency, unit, start
|
|
|
edbInfo.Sort = maxSort + 1
|
|
|
edbInfo.DataDateType = `交易日`
|
|
|
edbInfo.TerminalCode = terminalCode
|
|
|
+ edbInfo.SourceIndexName = sourceIndexName
|
|
|
timestamp := strconv.FormatInt(time.Now().UnixNano(), 10)
|
|
|
edbInfo.UniqueCode = utils.MD5(utils.DATA_PREFIX + "_" + timestamp)
|
|
|
itemVal, err := data_manage.GetEdbInfoMaxAndMinInfo(source, edbCode)
|
|
@@ -3123,7 +3125,7 @@ func GetChartMenuTreeRecursive(list []*data_manage.ChartClassifyItems, parentId
|
|
|
return res
|
|
|
}
|
|
|
|
|
|
-func GetTerminalFromBaseIndex(source int, edbCode string) (terminalCode string, err error) {
|
|
|
+func GetTerminalFromBaseIndex(source int, edbCode string) (terminalCode string, sourceIndexName string, err error) {
|
|
|
tbName := GetBaseIndexTableName(source)
|
|
|
if tbName != "" {
|
|
|
var item data_manage.BaseIndexTerminalCode
|
|
@@ -3133,6 +3135,7 @@ func GetTerminalFromBaseIndex(source int, edbCode string) (terminalCode string,
|
|
|
return
|
|
|
}
|
|
|
terminalCode = item.TerminalCode
|
|
|
+ sourceIndexName = item.IndexName
|
|
|
}
|
|
|
return
|
|
|
}
|