Commit dc7b07b0 authored by nanahira's avatar nanahira

fix

parent ff23a96f
Pipeline #33393 passed with stages
in 5 minutes and 37 seconds
......@@ -45,13 +45,14 @@ export class AppService extends ConsoleLogger {
.innerJoin(
'duelLog.players',
'dealer',
'dealer.realName IN (:...dealerUsernames) and dealer.winner = 0',
'dealer.realName IN (:...dealerUsernames) and dealer.winner = 0 and dealer.lp <= 0 and dealer.score <= 0',
{
dealerUsernames: this.dealerUsername,
},
)
.where('duelLogPlayer.realName = :username', { username })
.andWhere('duelLogPlayer.score >= dealer.score') // -9 and 0 is not win
.andWhere('duelLogPlayer.lp > 0')
.select('COUNT(duelLogPlayer.id)', 'win')
.getRawOne<{ win: string }>(),
this.duelLogPlayerRepository.count({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment