@@ -269,26 +269,26 @@ router.post('/score', function (req, res) {
// 真实得分 S(胜=1分,和=0.5分,负=0分)
letsa=0,sb=0
if(userscoreA>userscoreB){
if(userscoreA>userscoreB||userscoreB===-9){
sa=1
paramA['athletic_win']=1
paramB['athletic_lose']=1
winner=usernameA
}
if(userscoreA<userscoreB){
elseif(userscoreA<userscoreB||userscoreA===-9){
sb=1
paramA['athletic_lose']=1
paramB['athletic_win']=1
winner=usernameB
}
if(userscoreA===userscoreB){
else{
sa=0.5
sb=0.5
paramA['athletic_draw']=1
paramB['athletic_draw']=1
}
varqueryFirsrWinSql=`select count(*) from battle_history where type ='athletic' and ( (usernameA= '${winner}' AND userscorea > userscoreb ) OR (usernameB= '${winner}' AND userscoreb > userscorea) ) and start_time > '${today}' `
varqueryFirsrWinSql=`select count(*) from battle_history where type ='athletic' and userscorea != -5 and userscoreb != -5 and ( (usernameA= '${winner}' AND userscorea > userscoreb ) OR (usernameB= '${winner}' AND userscoreb > userscorea) ) and start_time > '${today}' `