|
@@ -60,6 +60,9 @@ func (this *EdbInfoController) EdbInfoSearch() {
|
|
|
stockCode := this.GetString("StockCode")
|
|
|
frequency := this.GetString("Frequency")
|
|
|
|
|
|
+ extraPars := this.GetString("ExtraPars")
|
|
|
+ extraPars = strings.TrimSpace(extraPars)
|
|
|
+
|
|
|
if source <= 0 {
|
|
|
br.Msg = "无效的数据来源"
|
|
|
return
|
|
@@ -222,7 +225,7 @@ func (this *EdbInfoController) EdbInfoSearch() {
|
|
|
br.Msg = "请输入指标代码"
|
|
|
return
|
|
|
}
|
|
|
- respItem, err := data.AddEdbDataThsDs(source, stockCode, edbCode)
|
|
|
+ respItem, err := data.AddEdbDataThsDs(source, stockCode, edbCode, extraPars)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
@@ -5785,6 +5788,17 @@ func (this *EdbInfoController) EdbInfoBatchAdd() {
|
|
|
edbInfoItem.StockCode = v.StockCode
|
|
|
edbInfoItem.TerminalCode = terminalCode
|
|
|
edbInfoItem.ServerUrl = serverUrl
|
|
|
+ var extra data_manage.EdbInfoExtra
|
|
|
+ if v.ApiExtraPars != "" {
|
|
|
+ extra.ApiExtraPars = v.ApiExtraPars
|
|
|
+ b, e := json.Marshal(extra)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "保存失败"
|
|
|
+ br.ErrMsg = fmt.Sprintf("额外参数JSON格式化失败, %v", e)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ edbInfoItem.Extra = string(b)
|
|
|
+ }
|
|
|
|
|
|
// 指标入库
|
|
|
edbInfo, err, errMsg, isSendEmail := data.EdbInfoWsdAdd(edbInfoItem)
|