|
@@ -84,7 +84,6 @@ func RefreshDataFromWind() (err error) {
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//刷新彭博数据
|
|
|
func RefreshDataFromPb() (err error) {
|
|
|
defer func() {
|
|
@@ -103,13 +102,14 @@ func RefreshDataFromPb() (err error) {
|
|
|
}
|
|
|
|
|
|
for _, v := range items {
|
|
|
- startDate := v.EndDate.AddDate(0, 0, -3).Format(utils.FormatDate)
|
|
|
- endDate := time.Now().Format(utils.FormatDate)
|
|
|
+ startDate := v.EndDate.AddDate(0, 0, -3).Format(utils.FormatDateUnSpace)
|
|
|
+ endDate := time.Now().Format(utils.FormatDateUnSpace)
|
|
|
+ fmt.Println(startDate, endDate)
|
|
|
err = SyncEdbDataByPb(int64(v.EdbInfoId), v.EdbCode, startDate, endDate)
|
|
|
if err != nil {
|
|
|
return errors.New("SyncEdbDataByPb:" + err.Error())
|
|
|
}
|
|
|
- minDate, maxDate, err := data_manage.GetEdbDataThsMaxOrMinDate(v.EdbInfoId)
|
|
|
+ minDate, maxDate, err := data_manage.GetEdbDataPbMaxOrMinDate(v.EdbInfoId)
|
|
|
if err != nil {
|
|
|
return errors.New("GetEdbDataThsMaxOrMinDate:" + err.Error())
|
|
|
}
|
|
@@ -128,7 +128,7 @@ func CheckDataInterface() (err error) {
|
|
|
if err != nil {
|
|
|
go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "CheckDataInterface ErrMsg:"+err.Error(), utils.EmailSendToUsers)
|
|
|
}
|
|
|
- result:=string(body)
|
|
|
+ result := string(body)
|
|
|
if result != "1" {
|
|
|
go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"检测数据接口:失败提醒", "CheckDataInterface ErrMsg:"+string(body), utils.EmailSendToUsers)
|
|
|
}
|