mirror of
https://github.com/norohind/SquadsActivityMonitor.git
synced 2025-04-13 13:27:13 +03:00
fix /diff when squad starts to exists in leaderboard
This commit is contained in:
parent
b0003fb153
commit
36bb3a78eb
@ -57,16 +57,16 @@ limit %(limit)s;"""
|
||||
select_diff_by_action_id = """select
|
||||
new_stats.name as "SquadronName",
|
||||
new_stats.tag,
|
||||
new_stats.score as "TotalExperience",
|
||||
old_stats.score as "TotalExperienceOld",
|
||||
new_stats.score - old_stats.score as "TotalExperienceDiff",
|
||||
coalesce(new_stats.score, 0) as "TotalExperience",
|
||||
coalesce(old_stats.score, 0) as "TotalExperienceOld",
|
||||
coalesce(new_stats.score, 0) - coalesce(old_stats.score, 0) as "TotalExperienceDiff",
|
||||
new_stats.leaderboard_type as "LeaderBoardType",
|
||||
new_stats.platform as "Platform"
|
||||
from (
|
||||
select *
|
||||
from squads_stats_states
|
||||
where action_id = %(action_id)s) new_stats
|
||||
inner join
|
||||
full join
|
||||
(
|
||||
select *
|
||||
from squads_stats_states
|
||||
@ -83,5 +83,5 @@ inner join
|
||||
order by squads_stats_states.action_id desc
|
||||
limit 1)) old_stats
|
||||
on new_stats.squadron_id = old_stats.squadron_id
|
||||
where new_stats.score - old_stats.score > 0
|
||||
where coalesce(new_stats.score, 0) - coalesce(old_stats.score, 0) <> 0
|
||||
order by new_stats.score - old_stats.score desc;"""
|
@ -13,7 +13,7 @@ function buildHtmlTable(arr) {
|
||||
for (var j = 0, maxj = columns.length; j < maxj; ++j) {
|
||||
var td = _td_.cloneNode(false);
|
||||
cellValue = arr[i][columns[j]];
|
||||
td.appendChild(document.createTextNode(arr[i][columns[j]] || ''));
|
||||
td.appendChild(document.createTextNode(arr[i][columns[j]]));
|
||||
tr.appendChild(td);
|
||||
}
|
||||
table.appendChild(tr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user