|
@@ -29,9 +29,21 @@ func RefreshEdbData(futureGoodEdbInfoId int, futureGoodEdbCode, startDate string
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+var step int //计数器
|
|
|
+
|
|
|
// postRefreshEdbData 刷新指标数据
|
|
|
func postRefreshEdbData(param map[string]interface{}, urlStr string) (resp *models.BaseResponse, err error) {
|
|
|
- postUrl := utils.EDB_LIB_URL + urlStr
|
|
|
+ var postUrl string
|
|
|
+ edbLibUrlListLen := len(utils.EDB_LIB_URL_LIST)
|
|
|
+ if edbLibUrlListLen <= 0 {
|
|
|
+ postUrl = utils.EDB_LIB_URL
|
|
|
+ } else {
|
|
|
+ rn := step % edbLibUrlListLen
|
|
|
+ postUrl = utils.EDB_LIB_URL_LIST[rn].Url
|
|
|
+ }
|
|
|
+ postUrl = postUrl + urlStr
|
|
|
+ step++
|
|
|
+
|
|
|
postData, err := json.Marshal(param)
|
|
|
if err != nil {
|
|
|
return
|