def unbind(db, openid):
'''
Parameters
----------
openid??????openid
Returns
-------
True ? False ??????????
'''
sql = "DELETE FROM dl_user_weixin WHERE openid = '%s'" % openid
try:
cursor = yield db.execute(sql)
except Exception, e:
BIZLOG.error('ERROR INFO IS : %s' % e.message)
raise Return(False)
if cursor.rowcount == 0:
BIZLOG.error('UNBIND ERROR: [openid: %s]' % (openid, ))
raise Return(False)
else:
BIZLOG.info('UNBIND SUCCESS: [openid: %s]' % (openid, ))
raise Return(True)
评论列表
文章目录