zwxi 1 year ago
parent
commit
3531c02ed2
1 changed files with 2 additions and 9 deletions
  1. 2 9
      controllers/base_from_ths_ds.go

+ 2 - 9
controllers/base_from_ths_ds.go

@@ -7,7 +7,6 @@ import (
 	"eta/eta_index_lib/services"
 	"eta/eta_index_lib/utils"
 	"strconv"
-	"strings"
 	"time"
 )
 
@@ -42,10 +41,7 @@ func (this *ThsDsController) Add() {
 		return
 	}
 	//期货数据,就默认到今天,特殊处理下
-	endDate := utils.BASE_END_DATE
-	if strings.Contains(req.EdbCode, ".") {
-		endDate = time.Now().Format(utils.FormatDate)
-	}
+	endDate := time.Now().Format(utils.FormatDate)
 
 	cacheKey = utils.CACHE_EDB_DATA_ADD + strconv.Itoa(source) + "_" + req.StockCode + req.EdbCode
 	if !utils.Rc.IsExist(cacheKey) {
@@ -102,10 +98,7 @@ func (this *ThsDsController) Refresh() {
 		return
 	}
 	//期货数据,就默认到今天,特殊处理下
-	endDate := utils.BASE_END_DATE
-	if strings.Contains(req.EdbCode, ".") {
-		endDate = time.Now().Format(utils.FormatDate)
-	}
+	endDate := time.Now().Format(utils.FormatDate)
 	// 获取指标详情
 	edbInfo, err := models.GetEdbInfoByEdbCode(source, req.EdbCode)
 	if err != nil {