@wraps(func)
def wrapper(*args, **kwargs):
    user_account = session.get('username', '')
    if user_account:
        login_user = SfoServerUser.query_user_by_account(user_account)
        g.user = login_user
        return func(*args, **kwargs)
    else:
        return ResponseBase(json.dumps({'status': 401, 'message': u'请先登录'}), status=401, content_type='application/json')
@wraps(func)
def wrapper(*args, **kwargs):
    user_account = session.get('username', )
    if user_account:
        login_user = SfoServerUser.query_user_by_account(user_account)
        g.user = login_user
        return func(*args, **kwargs)
    else:
        return ResponseBase(json.dumps({'status': 401, 'message': u'请先登录'}), status=401, content_type='application/json')