def del_user_by_account(self, account): ''' 删除用户 ''' where = (" account = '%s' " % account) pg_update.delete('user_info', where=where) UserRole.delete_role_by_account(account)
def delete_business_api(self, business_code, api): ''' 删除业务拥有api ''' where = (" api = '%s' and business_code = '%s' " % (api, business_code)) pg_update.delete('business_api', where=where)
def delete_role_business(self, role_code, business_code): ''' 删除角色拥有业务 ''' where = (" role_code = '%s' and business_code = '%s' " % (role_code, business_code)) pg_update.delete('role_business', where=where)
def delete_user_role(user_account=None, role_code=None): ''' 删除用户所属角色 ''' if user_account or role_code: where = (" account = '%s' " % user_account if user_account else " role_code = '%s' " % role_code) pg_update.delete('user_role', where=where)
def delete_role_by_role_code(self, role_code): ''' 通过角色代码删除用户所属角色 ''' where = " role_code = '%s' " % role_code pg_update.delete('user_role', where=where)
def delete_role_by_account(self, account): ''' 通过账户删除用户所属角色 ''' where = " account = '%s' " % account pg_update.delete('user_role', where=where)