def get_order_bill_count(*args, **kwargs):
    """
    获取订单支付凭证个数
    :param args:
    :param kwargs:
    :return: 0/Number(int)
    """
    return count(OrderBill, *args, **kwargs)
Beispiel #2
0
def get_child_count(user_id):
    """
    获取一级子节点元素数量
    :param user_id:
    :return:
    """
    condition = {'user_pid': user_id}
    child_count = count(UserProfile, **condition)
    return child_count
Beispiel #3
0
def is_put(user_id):
    """
    是否投资
    :param user_id:
    :return:
    """
    condition = {
        'user_id': user_id,
        'status_delete': STATUS_DEL_NO
    }
    return bool(count(ApplyPut, **condition))
Beispiel #4
0
def get_put_processing_count(user_id):
    """
    获取用户投资申请未匹配总单数
    :param user_id:
    :return:
    """
    condition = [
        ApplyPut.user_id == user_id,
        ApplyPut.status_order <= int(STATUS_ORDER_COMPLETED),
        ApplyPut.status_delete == int(STATUS_DEL_NO)
    ]
    num = count(ApplyPut, *condition)
    return num