#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @Date:2022/07/18 16:34:13 ''' from sqlalchemy import and_ from db_logic.db_base import Repository from models.client_models import EntityClient, EntityClientUser #用户操作业务逻辑类 class BllClientUser(Repository): def __init__(self, entityType=EntityClient): return super().__init__(entityType) def isJInZhiUser(self, userId, clientId): entity = self.findEntity( and_(EntityClientUser.user_id == userId, EntityClientUser.client_id == clientId)) if(entity is None): return False else: return True