|
@@ -61,6 +61,11 @@ func (this *FutureGoodEdbInfoController) Add() {
|
|
|
}
|
|
|
|
|
|
//endDate := utils.BASE_END_DATE
|
|
|
+ endDateTime := time.Now()
|
|
|
+ //每天下午三点之前刷新数据的话,截止日期就到昨天,三点之后才刷新到今天的日期
|
|
|
+ if endDateTime.Hour() < 15 {
|
|
|
+ endDateTime = endDateTime.AddDate(0, 0, -1)
|
|
|
+ }
|
|
|
endDate := time.Now().Format(utils.FormatDate)
|
|
|
|
|
|
windUrl := utils.Hz_Wind_Data_Url_LIST[0].Url
|
|
@@ -151,7 +156,12 @@ func (this *FutureGoodEdbInfoController) Refresh() {
|
|
|
|
|
|
//期货数据,就默认到今天,特殊处理下
|
|
|
//endDate := utils.BASE_END_DATE
|
|
|
- endDate := time.Now().Format(utils.FormatDate)
|
|
|
+ endDateTime := time.Now()
|
|
|
+ //每天下午三点之前刷新数据的话,截止日期就到昨天,三点之后才刷新到今天的日期
|
|
|
+ if endDateTime.Hour() < 15 {
|
|
|
+ endDateTime = endDateTime.AddDate(0, 0, -1)
|
|
|
+ }
|
|
|
+ endDate := endDateTime.Format(utils.FormatDate)
|
|
|
|
|
|
dataItem, errCode, err := services.GetFutureGoodDataFromWindUrl(futureGoodEdbInfo.ServerUrl, req.FutureGoodEdbCode, req.StartDate, endDate)
|
|
|
if errCode == 421 { //指标超限
|