def check_phone_unique(phone): """ 校验联系电话是否唯一 :param phone: :return: """ if not user_core.check_user_unique({'phone': phone}): raise NotUniqueException("联系电话:{}已存在!".format(phone))
def check_name_unique(name): """ 校验名称是否唯一 :param name: :return: """ if not user_core.check_user_unique({'name': name}): raise NotUniqueException("名称:{}已存在!".format(name))
def check_email_unique(email): """ 校验邮箱是否唯一 :param email: :return: """ if not user_core.check_user_unique({'email': email}): raise NotUniqueException("邮箱:{}已存在!".format(email))