package com.yuchen.saas.park.service.service.door.config;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuchen.saas.park.api.commons.PageWrapper;
import com.yuchen.saas.park.api.commons.domain.DepartmentGroup;
import com.yuchen.saas.park.api.commons.domain.DoorAccessControlConfigCombinedTarget;
import com.yuchen.saas.park.api.commons.domain.DoorAccessControlConfigSetting;
import com.yuchen.saas.park.api.dto.door.DoorAccessControlConfigSettingDTO;
import com.yuchen.saas.park.service.mapper.domain.DoorAccessControlBlacklistedCondition;
import com.yuchen.saas.park.service.mapper.domain.DoorAccessControlBlacklistedRO;
import com.yuchen.saas.park.service.service.domain.DoorAccessControlUserPermissionsSave;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Positive;
import java.util.Set;

public interface DoorAccessControlConfigService {
    void bind(DoorAccessControlConfigCombinedTarget target, DoorAccessControlConfigSetting setting);

    void batchDelete(@NotEmpty Set<@Positive Long> ids);

    void batchUpdateById(DoorAccessControlConfigSettingDTO doorAccessControlConfigSettingDTO);

    void batchUpdate(@NotEmpty Set<@Positive Long> ids, DoorAccessControlConfigSetting setting);

    void triggerUserGroup(@Positive long userGroupId);

    void triggerDepartmentGroup(DepartmentGroup departmentGroup);

    void triggerDoorAccessControlGroup(@Positive long doorAccessControlGroupId);

    void triggerCard(@Positive long cardId);

    void triggerUserFacial(@Positive long userId);

    /**
     * 权限控制
     */
    void setPermissions(DoorAccessControlUserPermissionsSave o);

    void batchSaveBlacklisted(@NotEmpty Set<@Positive Long> userIds);

    void batchDeleteBlacklistedByUserIds(@NotEmpty Set<@Positive Long> userIds);

    IPage<DoorAccessControlBlacklistedRO> pageBlacklisted(PageWrapper<DoorAccessControlBlacklistedCondition> o);
}
