mirror of
https://github.com/djhackersdev/minime.git
synced 2026-04-20 16:27:14 -05:00
chuni: fix lost scores for real
This commit is contained in:
parent
ac9cf50d28
commit
834804b2ea
|
|
@ -23,7 +23,7 @@ export default async function getGameSetting(
|
|||
isBackgroundDistribute: "false",
|
||||
maxCountCharacter: "300",
|
||||
maxCountItem: "300",
|
||||
maxCountMusic: "300",
|
||||
maxCountMusic: "100",
|
||||
},
|
||||
isDumpUpload: "false",
|
||||
isAou: "false",
|
||||
|
|
|
|||
|
|
@ -34,14 +34,22 @@ export class SqlUserMusicRepository implements UserMusicRepository {
|
|||
profileId: Id<UserDataItem>,
|
||||
page?: Page
|
||||
): Promise<UserMusicDetailItem[]> {
|
||||
const preStmt = sql
|
||||
.select("DISTINCT(music_id)")
|
||||
.from("cm_user_music")
|
||||
.where("profile_id", profileId)
|
||||
.orderBy("music_id");
|
||||
if (page) {
|
||||
preStmt.limit(page.limit).offset(page.offset);
|
||||
}
|
||||
const preRows = await this._txn.fetchRows(preStmt);
|
||||
const musicIds = preRows.map(r => r.music_id);
|
||||
|
||||
const stmt = sql
|
||||
.select("*")
|
||||
.from("cm_user_music")
|
||||
.where("profile_id", profileId);
|
||||
|
||||
if (page) {
|
||||
stmt.limit(page.limit).offset(page.offset);
|
||||
}
|
||||
.where("profile_id", profileId)
|
||||
.and(sql.in('music_id', musicIds));
|
||||
|
||||
const rows = await this._txn.fetchRows(stmt);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user