feat: 弃用腾讯tts,该用火山引擎tts

This commit is contained in:
Blizzard
2026-03-20 17:06:19 +08:00
parent e4b7ee04cc
commit f4bfe2d609
13 changed files with 294 additions and 173 deletions
+22
View File
@@ -54,3 +54,25 @@ func GetMaxTime() time.Time {
maxTime := time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 999999999, time.Local)
return maxTime
}
// ParseDateRange 解析日期范围,未传则默认最近30天
func ParseDateRange(startDate, endDate string) (time.Time, time.Time) {
now := time.Now()
layout := "2006-01-02"
end, err := time.Parse(layout, endDate)
if err != nil {
end = now
}
// 结束日期取当天 23:59:59
end = time.Date(end.Year(), end.Month(), end.Day(), 23, 59, 59, 0, time.Local)
start, err := time.Parse(layout, startDate)
if err != nil {
start = end.AddDate(0, 0, -29) // 默认30天
}
// 开始日期取当天 00:00:00
start = time.Date(start.Year(), start.Month(), start.Day(), 0, 0, 0, 0, time.Local)
return start, end
}