mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-23 03:22:17 +08:00
feat:contact order by pingying
This commit is contained in:
parent
d01cea22fa
commit
ce909e567e
@ -46,10 +46,16 @@ class MicroMsg:
|
|||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
lock.acquire(True)
|
lock.acquire(True)
|
||||||
sql = '''select UserName,Alias,Type,Remark,NickName,PYInitial,RemarkPYInitial,ContactHeadImgUrl.smallHeadImgUrl,ContactHeadImgUrl.bigHeadImgUrl
|
sql = '''SELECT UserName, Alias, Type, Remark, NickName, PYInitial, RemarkPYInitial, ContactHeadImgUrl.smallHeadImgUrl, ContactHeadImgUrl.bigHeadImgUrl
|
||||||
from Contact inner join ContactHeadImgUrl on Contact.UserName = ContactHeadImgUrl.usrName
|
FROM Contact
|
||||||
where Type%2=1 and Alias is not null
|
INNER JOIN ContactHeadImgUrl ON Contact.UserName = ContactHeadImgUrl.usrName
|
||||||
order by PYInitial
|
WHERE Type % 2 = 1
|
||||||
|
AND NickName != ''
|
||||||
|
ORDER BY
|
||||||
|
CASE
|
||||||
|
WHEN RemarkPYInitial = '' THEN PYInitial
|
||||||
|
ELSE RemarkPYInitial
|
||||||
|
END ASC
|
||||||
'''
|
'''
|
||||||
self.cursor.execute(sql)
|
self.cursor.execute(sql)
|
||||||
result = self.cursor.fetchall()
|
result = self.cursor.fetchall()
|
||||||
|
Loading…
Reference in New Issue
Block a user