Fix: request history and ranking record with maestroID
This commit is contained in:
@@ -81,7 +81,7 @@ class DBConnectManager {
|
||||
xhr.send("maestro_id=" + maestroID);
|
||||
}
|
||||
|
||||
requestPlayerHistory(date, listener) {
|
||||
requestPlayerHistory(maestroID, date, listener) {
|
||||
let historyRecordManager = new HistoryRecordManager();
|
||||
|
||||
/*
|
||||
@@ -111,7 +111,8 @@ class DBConnectManager {
|
||||
onFailedListener(replyJSON);
|
||||
}
|
||||
};
|
||||
let params = "AppID=" + sessionStorageManager.playingAppID
|
||||
let params = "MaestroID=" + sessionStorageManager.maestroID
|
||||
+ "&AppID=" + sessionStorageManager.playingAppID
|
||||
+ "&UserID=" + sessionStorageManager.playerUserID
|
||||
+ "&Date=" + date;
|
||||
xhr.send(params);
|
||||
@@ -160,7 +161,7 @@ class DBConnectManager {
|
||||
*/
|
||||
}
|
||||
|
||||
requestRanking(type, date, time, listener) {
|
||||
requestRanking(type, maestroID, date, time, listener) {
|
||||
let rankingRecordManager = new RankingRecordManager();
|
||||
|
||||
/*
|
||||
@@ -190,7 +191,8 @@ class DBConnectManager {
|
||||
onFailedListener(replyJSON);
|
||||
}
|
||||
};
|
||||
let params = "AppID=" + sessionStorageManager.playingAppID
|
||||
let params = "MaestroID=" + sessionStorageManager.maestroID
|
||||
+ "&AppID=" + sessionStorageManager.playingAppID
|
||||
+ "&Date=" + date
|
||||
+ "&Time=" + time;
|
||||
xhr.send(params);
|
||||
|
||||
@@ -16,6 +16,7 @@ class HistoryBoard {
|
||||
let today = new Date();
|
||||
let date = DateUtil.getYYYYMMDD(today);
|
||||
this.dbConnectManager.requestPlayerHistory(
|
||||
sessionStorageManager.maestroID,
|
||||
date,
|
||||
historyRecordManager => {
|
||||
if(historyRecordManager.count == 0) {
|
||||
|
||||
@@ -17,7 +17,7 @@ class RankingBoard {
|
||||
let date = DateUtil.getYYYYMMDD(today);
|
||||
let time = DateUtil.getHHMMSS(today);
|
||||
this.dbConnectManager.requestRanking(
|
||||
type, date, time,
|
||||
type, sessionStorageManager.maestroID, date, time,
|
||||
(type, rankingRecordManager) => {
|
||||
if(rankingRecordManager.count == 0) {
|
||||
console.log("ranking board - no data");
|
||||
|
||||
@@ -28,6 +28,7 @@ class Start {
|
||||
let today = new Date();
|
||||
let date = DateUtil.getYYYYMMDD(today);
|
||||
this.dbConnectManager.requestPlayerHistory(
|
||||
sessionStorageManager.maestroID,
|
||||
date,
|
||||
historyRecordManager => {
|
||||
this.printChartBaseLine();
|
||||
|
||||
Reference in New Issue
Block a user