package com.persagy.adm.diagram.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.persagy.adm.diagram.entity.DiagramEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 系统图类型Dao
 *
 * @author liyang
 * @date 2021-12-01
 */
public interface DiagramMapper extends BaseMapper<DiagramEntity> {


    //按系统图类型查询
    List<DiagramEntity> getDiagrams(@Param("diagramType") String diagramType,
                                    @Param("projectId") String projectId,
                                    @Param("systemId") String systemId,
                                    @Param("groupCode") String groupCode,
                                    @Param("name") String name);

    //按系统图类型查询
    List<DiagramEntity> getDiagramsBySystemIds(@Param("systemIds") List<String> ids);

    void saveDiagram(DiagramEntity diagramEntity);

    boolean deleteByDiagramId(String diagramId);

    DiagramEntity getDiagram(String diagramId);

}
