package com.gyee.wisdom.alarm.sharding.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gyee.wisdom.alarm.sharding.entity.DeviceFaultMode;
import com.gyee.wisdom.alarm.sharding.entity.FaultInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


@Mapper
public interface DeviceFaultModeMapper extends BaseMapper<DeviceFaultMode> {

    DeviceFaultMode getDeviceFaultModeByCode(@Param("code")String code);


    List<DeviceFaultMode> getDeviceFaultModeByDeviceId(@Param("deviceId")String deviceId);


    List<DeviceFaultMode> getDeviceFaultModeByStructureCode(@Param("deviceId")String deviceId,
                                                      @Param("structureCode")String structureCode);

    int deleteDeviceFaultMode(@Param("id")Long id);


    DeviceFaultMode getDeviceFaultModeTree(@Param("deviceId")String deviceId,
                                           @Param("nodeCode")String nodeCode);

}
