|
@@ -67,6 +67,15 @@ func InitTradePosition(exchange, startDate, endDate string) (err error, errMsg s
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if len(originList) <= 0 {
|
|
if len(originList) <= 0 {
|
|
|
|
+ // 忽略周末
|
|
|
|
+ w := time.Now().Weekday().String()
|
|
|
|
+ if w == "Saturday" || w == "Sunday" {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // 每天最后一个小时执行依旧无数据时, 才进行邮件提示
|
|
|
|
+ if time.Now().Hour() != 23 {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
err = fmt.Errorf("原始数据没有值")
|
|
err = fmt.Errorf("原始数据没有值")
|
|
return
|
|
return
|
|
}
|
|
}
|