services.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:wxnotify 作者: mxgnene01 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号