修正delCache时的报错

This commit is contained in:
Kokomi 2023-08-21 03:27:51 +08:00
parent 445e9ea4f2
commit bb8ec81209
1 changed files with 3 additions and 2 deletions

View File

@ -498,9 +498,10 @@ export default class MysUser extends BaseModel {
} }
// 删除MysUser用户记录会反向删除User中的记录及绑定关系 // 删除MysUser用户记录会反向删除User中的记录及绑定关系
async delWithUser () { async delWithUser (game = 'gs') {
// 查找用户 // 查找用户
let qqArr = await this.cache.kGet(tables.qq, this.ltuid, true) let cache = this.getCache(game)
let qqArr = await cache.kGet(tables.qq, this.ltuid, true)
if (qqArr && qqArr.length > 0) { if (qqArr && qqArr.length > 0) {
for (let qq of qqArr) { for (let qq of qqArr) {
let user = await NoteUser.create(qq) let user = await NoteUser.create(qq)