|
@@ -20,6 +20,12 @@ func getEdbDataFromThsDsHttp(stockCode, edbCode, startDate, endDate, thsRefreshT
|
|
|
// 分割字符串
|
|
|
paramList := strings.Split(edbCode, ",")
|
|
|
|
|
|
+ var extraArr []string
|
|
|
+ if extraPars != "" {
|
|
|
+ extraPars = strings.TrimSpace(extraPars)
|
|
|
+ extraArr = strings.Split(extraPars, ",")
|
|
|
+ }
|
|
|
+
|
|
|
// 创建一个包含映射的切片
|
|
|
var indipara []map[string]interface{}
|
|
|
|
|
@@ -29,9 +35,8 @@ func getEdbDataFromThsDsHttp(stockCode, edbCode, startDate, endDate, thsRefreshT
|
|
|
paramMap := map[string]interface{}{
|
|
|
"indicator": param,
|
|
|
}
|
|
|
- if extraPars != "" {
|
|
|
- extraPars = strings.TrimSpace(extraPars)
|
|
|
- paramMap["indiparams"] = extraPars
|
|
|
+ if len(extraArr) > 0 {
|
|
|
+ paramMap["indiparams"] = extraArr
|
|
|
}
|
|
|
|
|
|
// 将映射添加到切片中
|