package com.fuyuanshen.equipment.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuyuanshen.equipment.domain.Device;
import com.fuyuanshen.equipment.domain.DeviceGroup;
import com.fuyuanshen.equipment.domain.bo.DeviceGroupBo;
import com.fuyuanshen.equipment.domain.vo.DeviceGroupVo;
import com.fuyuanshen.common.mybatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 设备分组Mapper接口
 *
 * @author Lion Li
 * @date 2025-08-08
 */
public interface DeviceGroupMapper extends BaseMapperPlus<DeviceGroup, DeviceGroupVo> {

    /**
     * 查询设备分组列表
     *
     * @param bo 设备分组
     * @return 设备分组
     */
    IPage<DeviceGroup> selectRootGroups(@Param("bo") DeviceGroupBo bo, Page<Device> page);

    /**
     * 查询子分组
     *
     * @param id
     * @return
     */
    List<DeviceGroup> selectByParentId(Long id);

}
