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.Alertrule2;
import com.gyee.wisdom.alarm.sharding.model.Alertrule2Example;
import com.gyee.wisdom.alarm.sharding.model.TreeNode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
public interface Alertrule2Mapper extends BaseMapper<Alertrule2> {

    IPage<Alertrule2> pageQueryAll(Page page,
                                   @Param("name") String name,
                                   @Param("station") String station,
                                   @Param("modelId")String modelId,
                                   @Param("rank")String rank,
                                   @Param("category")String category);

    Integer getMaxEdnaValue();

    List<Alertrule2> getAllByStationIdAndModelId(@Param("idString") String idString);

    List<Alertrule2> getById(@Param("idString") String idString);

    List<Alertrule2> queryTree();

    List<Map<String, Alertrule2>> quertByrelatedParts(String relatedParts);

    List<Alertrule2> queryMap();

    int updateByAlertrule2Id(Alertrule2 alertrule2);

    Alertrule2 selectByAlertrule2Id(String id);


    int insertAlerture2(Alertrule2 alertrule2);

    List<Alertrule2> selectByExample(Alertrule2Example example);

}
