@@ -197,7 +197,7 @@ router.post('/score', function (req, res) {
...
@@ -197,7 +197,7 @@ router.post('/score', function (req, res) {
// select count(*) from battle_history where (usernameA = '爱吉' OR usernameB = '爱吉') and start_time > date '2017-02-09'
// select count(*) from battle_history where (usernameA = '爱吉' OR usernameB = '爱吉') and start_time > date '2017-02-09'
// 日首胜 每日0点开始计算 日首胜的话是额外增加固定4DP
// 日首胜 每日0点开始计算 日首胜的话是额外增加固定4DP
vartoday=moment().format('YYYY-MM-DD')
vartoday=moment(start).format('YYYY-MM-DD')
// 真实得分 S(胜=1分,和=0.5分,负=0分)
// 真实得分 S(胜=1分,和=0.5分,负=0分)
letsa=0,sb=0
letsa=0,sb=0
...
@@ -220,8 +220,9 @@ router.post('/score', function (req, res) {
...
@@ -220,8 +220,9 @@ router.post('/score', function (req, res) {
paramB['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 > date '${today}' `
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}' `