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


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yuchen.saas.park.api.dto.door.DoorDeviceGroupDTO;
import com.yuchen.saas.park.api.entity.door.DoorDeviceGroup;
import com.yuchen.saas.park.api.entity.door.DoorDeviceGroupItem;
import com.yuchen.saas.park.api.entity.door.DoorDevicePoint;
import com.yuchen.saas.park.api.entity.door.PageDeviceGroupItemReqDTO;
import com.yuchen.saas.park.api.vo.door.DoorDeviceGroupVO;
import org.nest.springwrap.core.mp.support.NestPage;
import org.nest.springwrap.core.tool.api.R;

import java.util.List;

/**
 * <p>
 * 门禁分组 服务类
 * </p>
 *
 * @author miaoqs
 * @since 2023-12-20
 */
public interface DoorDeviceGroupService extends IService<DoorDeviceGroup> {

    /**
     * 新增/修改
     * @param doorDeviceGroupDTO
     * @return
     */
    Boolean saveOrUpdateByParam(DoorDeviceGroupDTO doorDeviceGroupDTO);

    /**
     * 详情
     * @param id
     * @return
     */
    DoorDeviceGroupVO detailById(Long id);

    /**
     * 删除
     * @param id
     */
    String deleteById(Long id) throws Exception;

    /**
     * 批量删除
     * @param idList
     */
    String batchRemoveId(List<Long> idList) throws Exception;

    /**
     * 获取详情-门禁点列表分页
     * @param page
     * @param req
     * @return
     */
    NestPage<DoorDevicePoint> devicePointPage(Page<DoorDeviceGroupItem> page, PageDeviceGroupItemReqDTO req);

    /**
     * 获取列表
     * @param doorDeviceGroup
     * @return
     */
    List<DoorDeviceGroup> listByparam(DoorDeviceGroup doorDeviceGroup);

}
