比赛场开赛时间判断

This commit is contained in:
sk 2024-06-19 21:01:17 +08:00
parent 168c2cc8c3
commit 992ccb280e
1 changed files with 21 additions and 3 deletions

View File

@ -1394,11 +1394,29 @@ func (this *Tournament) GetSCTMInfosPack(platform, channelName string) *tourname
tMInfo.MatchTimeWeek = append(tMInfo.MatchTimeWeek, week) tMInfo.MatchTimeWeek = append(tMInfo.MatchTimeWeek, week)
} }
} }
if info.MatchTimeStamp != nil && len(info.MatchTimeStamp) > 0 {
for _, stamp := range info.MatchTimeStamp { if info.MatchType == MatchTypeChampion {
tMInfo.MatchTimeStamp = append(tMInfo.MatchTimeStamp, stamp) week := this.getWeekDay()
for _, v := range info.MatchTimeWeek {
if v == int32(week) {
if info.MatchTimeStamp != nil && len(info.MatchTimeStamp) > 0 {
for _, stamp := range info.MatchTimeStamp {
tMInfo.MatchTimeStamp = append(tMInfo.MatchTimeStamp, stamp)
}
}
}
}
if len(tMInfo.MatchTimeStamp) == 0 {
tMInfo.MatchTimeStamp = []int64{time.Now().AddDate(0, 0, 2).Unix(), time.Now().AddDate(0, 0, 3).Unix()}
}
} else {
if info.MatchTimeStamp != nil && len(info.MatchTimeStamp) > 0 {
for _, stamp := range info.MatchTimeStamp {
tMInfo.MatchTimeStamp = append(tMInfo.MatchTimeStamp, stamp)
}
} }
} }
if info.MatchPromotion != nil { if info.MatchPromotion != nil {
for _, mp := range info.MatchPromotion { for _, mp := range info.MatchPromotion {
tMInfo.MatchPromotion = append(tMInfo.MatchPromotion, mp) tMInfo.MatchPromotion = append(tMInfo.MatchPromotion, mp)