add: func:getUnArchivedBiliUsers

This commit is contained in:
alikia2x (寒寒) 2025-03-02 18:48:01 +08:00
parent 1720ff332e
commit 47e47f2b12
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
2 changed files with 14 additions and 0 deletions

View File

@ -48,3 +48,17 @@ export async function getVideoInfoFromAllData(client: Client, aid: number) {
author_info: authorInfo
};
}
export async function getUnArchivedBiliUsers(client: Client) {
const queryResult = await client.queryObject<{uid: number}>(
`
SELECT ad.uid
FROM all_data ad
LEFT JOIN bili_user bu ON ad.uid = bu.uid
WHERE bu.uid IS NULL;
`,
[]
);
const rows = queryResult.rows;
return rows.map((row) => row.uid);
}

View File