提交 e5d7d413 编写于 作者: M monomania

1.处理杯赛cup match标识

上级 d9900714
......@@ -214,11 +214,7 @@ func (this *A3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
bffe_main := this.BFFutureEventService.FindNextBattle(matchId, v.MainTeamId)
bffe_guest := this.BFFutureEventService.FindNextBattle(matchId, v.GuestTeamId)
if strings.Contains(bffe_main.EventLeagueId, "杯") {
//下一场打杯赛
return -3, nil
}
if strings.Contains(bffe_guest.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_main.EventLeagueId) || this.IsCupMatch(bffe_guest.EventLeagueId) {
//下一场打杯赛
return -3, nil
}
......
......@@ -268,9 +268,11 @@ func (this *AnalyService) IsRight2Option(last *entity2.MatchLast, analy *entity5
}
analy.Result = resultFlag
league := this.LeagueService.FindById(last.LeagueId)
if strings.Contains(league.Name,"杯") || strings.Contains(league.Name,"赛"){
if this.IsCupMatch(league.Name){
analy.TOVoid = true
analy.TOVoidDesc = "杯赛"
}else{
analy.TOVoidDesc = ""
}
//打印数据
......@@ -279,6 +281,13 @@ func (this *AnalyService) IsRight2Option(last *entity2.MatchLast, analy *entity5
return resultFlag
}
func (this *AnalyService) IsCupMatch(leagueName string) bool {
if strings.Contains(leagueName,"杯") || strings.Contains(leagueName,"锦"){
return true;
}
return false;
}
func (this *AnalyService) IsRight(last *entity2.MatchLast, analy *entity5.AnalyResult) string {
//比赛结果
globalResult := this.ActualResult(last, analy)
......@@ -295,9 +304,11 @@ func (this *AnalyService) IsRight(last *entity2.MatchLast, analy *entity5.AnalyR
analy.Result = resultFlag
league := this.LeagueService.FindById(last.LeagueId)
if strings.Contains(league.Name,"杯") || strings.Contains(league.Name,"赛"){
if this.IsCupMatch(league.Name){
analy.TOVoid = true
analy.TOVoidDesc = "杯赛"
}else{
analy.TOVoidDesc = "杯赛"
}
//打印数据
......
......@@ -268,7 +268,7 @@ func (this *C1Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
//未来赛事
bffe_main := this.BFFutureEventService.FindNextBattle(matchId, v.MainTeamId)
bffe_guest := this.BFFutureEventService.FindNextBattle(matchId, v.GuestTeamId)
if strings.Contains(bffe_main.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_main.EventLeagueId){
//下一场打杯赛
return -3, nil
} else {
......@@ -277,7 +277,7 @@ func (this *C1Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
letBall += 0.125
}
}
if strings.Contains(bffe_guest.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_guest.EventLeagueId){
//下一场打杯赛
return -3, nil
} else {
......
......@@ -285,7 +285,7 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
bffe_main := this.BFFutureEventService.FindNextBattle(matchId, v.MainTeamId)
bffe_guest := this.BFFutureEventService.FindNextBattle(matchId, v.GuestTeamId)
if strings.Contains(bffe_main.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_main.EventLeagueId){
//下一场打杯赛
return -3, nil
} else {
......@@ -294,7 +294,7 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
letBall += (baseVal)
}
}
if strings.Contains(bffe_guest.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_guest.EventLeagueId){
//下一场打杯赛
return -3, nil
} else {
......
......@@ -282,7 +282,7 @@ func (this *C3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
bffe_main := this.BFFutureEventService.FindNextBattle(matchId, v.MainTeamId)
bffe_guest := this.BFFutureEventService.FindNextBattle(matchId, v.GuestTeamId)
if strings.Contains(bffe_main.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_main.EventLeagueId){
//下一场打杯赛
//return -3, nil
} else {
......@@ -291,7 +291,8 @@ func (this *C3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
letBall += (baseVal)
}
}
if strings.Contains(bffe_guest.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_guest.EventLeagueId){
//下一场打杯赛
//return -3, nil
} else {
......@@ -377,10 +378,10 @@ func (this *C3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
base.Log.Info("-")
}
if preResult == 3 && strings.Contains(bffe_main.EventLeagueId, "杯") {
if preResult == 3 && this.IsCupMatch(bffe_main.EventLeagueId) {
//下一场打杯赛
return -3, nil
} else if preResult == 0 && strings.Contains(bffe_guest.EventLeagueId, "杯") {
} else if preResult == 0 && this.IsCupMatch(bffe_guest.EventLeagueId) {
//下一场打杯赛
return -3, nil
}
......
......@@ -124,11 +124,7 @@ func (this *E3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
bffe_main := this.BFFutureEventService.FindNextBattle(matchId, v.MainTeamId)
bffe_guest := this.BFFutureEventService.FindNextBattle(matchId, v.GuestTeamId)
if strings.Contains(bffe_main.EventLeagueId, "杯") {
//下一场打杯赛
return -3, nil
}
if strings.Contains(bffe_guest.EventLeagueId, "杯") {
if this.IsCupMatch(bffe_main.EventLeagueId) || this.IsCupMatch(bffe_guest.EventLeagueId) {
//下一场打杯赛
return -3, nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册