mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-23 03:22:17 +08:00
修复contactLabel表不存在的问题
This commit is contained in:
parent
9ea9d4b5f4
commit
905bfdfa86
@ -57,6 +57,22 @@ class MicroMsg:
|
|||||||
'''
|
'''
|
||||||
self.cursor.execute(sql)
|
self.cursor.execute(sql)
|
||||||
result = self.cursor.fetchall()
|
result = self.cursor.fetchall()
|
||||||
|
except sqlite3.OperationalError:
|
||||||
|
# lock.acquire(True)
|
||||||
|
sql = '''
|
||||||
|
SELECT UserName, Alias, Type, Remark, NickName, PYInitial, RemarkPYInitial, ContactHeadImgUrl.smallHeadImgUrl, ContactHeadImgUrl.bigHeadImgUrl,ExTraBuf,"None"
|
||||||
|
FROM Contact
|
||||||
|
INNER JOIN ContactHeadImgUrl ON Contact.UserName = ContactHeadImgUrl.usrName
|
||||||
|
WHERE (Type!=4 AND VerifyFlag=0)
|
||||||
|
AND NickName != ''
|
||||||
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN RemarkPYInitial = '' THEN PYInitial
|
||||||
|
ELSE RemarkPYInitial
|
||||||
|
END ASC
|
||||||
|
'''
|
||||||
|
self.cursor.execute(sql)
|
||||||
|
result = self.cursor.fetchall()
|
||||||
finally:
|
finally:
|
||||||
lock.release()
|
lock.release()
|
||||||
from app.DataBase import msg_db
|
from app.DataBase import msg_db
|
||||||
@ -76,6 +92,16 @@ class MicroMsg:
|
|||||||
'''
|
'''
|
||||||
self.cursor.execute(sql, [username])
|
self.cursor.execute(sql, [username])
|
||||||
result = self.cursor.fetchone()
|
result = self.cursor.fetchone()
|
||||||
|
except sqlite3.OperationalError:
|
||||||
|
# lock.acquire(True)
|
||||||
|
sql = '''
|
||||||
|
SELECT UserName, Alias, Type, Remark, NickName, PYInitial, RemarkPYInitial, ContactHeadImgUrl.smallHeadImgUrl, ContactHeadImgUrl.bigHeadImgUrl,ExTraBuf,"None"
|
||||||
|
FROM Contact
|
||||||
|
INNER JOIN ContactHeadImgUrl ON Contact.UserName = ContactHeadImgUrl.usrName
|
||||||
|
WHERE UserName = ?
|
||||||
|
'''
|
||||||
|
self.cursor.execute(sql, [username])
|
||||||
|
result = self.cursor.fetchone()
|
||||||
finally:
|
finally:
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user