package com.yuchen.saas.park.service.service.adapter;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuchen.saas.park.api.commons.PageWrapper;
import com.yuchen.saas.park.service.mapper.domain.config.details.DoorAccessControlCondition;
import com.yuchen.saas.park.service.mapper.domain.config.details.DoorAccessControlRO;

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

public interface AdapterComponent {

    /**
     * 部门->用户
     */
    Map<@Positive Long, Set<@Positive Long>> listUserIdByDepartmentIds(Set<@Positive Long> ids);

    /**
     * 部门->下属部门
     */
    Map<@Positive Long, Set<@Positive Long>> listDepartmentIdsByDepartmentIdsRecursive(Set<@Positive Long> ids);

    /**
     * 用户分组->用户
     */
    Map<@Positive Long, Set<@Positive Long>> listUserIdByUserGroupIds(Set<@Positive Long> ids);

    /**
     * 查询 门禁分组id-门禁id
     */
    Map<@Positive Long, Set<@Positive Long>> listDoorAccessControlIdByGroupIds(Set<@Positive Long> ids);

    /**
     * 查询门禁基础信息 + 指纹/人脸配置
     */
    IPage<DoorAccessControlRO> pageDoorAccessControl(PageWrapper<DoorAccessControlCondition> o);

    Map<@Positive Long, @Positive Integer> listAllDoorAccessControlTemplateIdNo();
}
