/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.security.trans.settings.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.security.trans.settings.dto.DeviceCategorySettingsDTO;
import org.security.trans.settings.entity.DeviceCategorySettings;
import org.security.trans.settings.vo.DeviceCategorySettingsVO;
import org.springblade.core.tool.api.R;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * 系统配置-设备类型设置 服务类
 *
 * @author BladeX
 * @since 2022-03-03
 */
public interface IDeviceCategorySettingsService extends IService<DeviceCategorySettings> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param deviceCategorySettings
	 * @return
	 */
	IPage<DeviceCategorySettingsVO> selectDeviceCategorySettingsPage(IPage<DeviceCategorySettingsVO> page, DeviceCategorySettingsVO deviceCategorySettings);

	/**
	 * 新增或修改
	 *
	 * @param deviceCategorySettings
	 * @return
	 */
	boolean saveDeviceCategorySettings(DeviceCategorySettingsDTO deviceCategorySettings) throws ParseException;

	/**
	 * 查询树形数据
	 *
	 * @param
	 * @return
	 */
	List<DeviceCategorySettingsVO> tree(DeviceCategorySettingsDTO deviceCategorySettingsDTO);

	/**
	 * 懒加载树形结构
	 *
	 * @param parentId
	 * @return
	 */
	List<DeviceCategorySettingsVO> lazyTree(Long parentId);
	/**
	 * 懒加载列表
	 *
	 * @param parentId
	 * @param param
	 * @return
	 */
	List<DeviceCategorySettingsVO> lazyList(Long parentId, Map<String, Object> param);

	List<DeviceCategorySettingsVO> cascadeSelection();

	DeviceCategorySettingsVO getDetailById(String id);
	/**
	 * 自定义删除
	 *
	 * @param toLongList
	 * @return
	 */
	R removeDeviceCategory(List<Long> toLongList) throws ParseException;
}
