package com.liangjian.dataplatform.member.dao.primary;

import com.liangjian.dataplatform.member.entity.po.primary.MetaCore;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author: 黄子奇
 * @Date: 2019/8/26 11:11
 */
public interface MetaCoreRepository extends JpaRepository<MetaCore, String> {

    /**
     * 根据父节点查询
     * @param prtId
     * @return
     */
    List<MetaCore> queryByPrtId(String prtId);

    /**
     * 分页根据父节点查询
     * @param prtId
     * @return
     */
    Page<MetaCore> queryByPrtId(String prtId, Pageable pageable);

    /**
     * 根据父级和MetaMdl查询
     * @param prtId
     * @param metaMdl
     * @return
     */
    List<MetaCore> queryByPrtIdAndMetaMdl(String prtId, String metaMdl);

    /**
     * 分页根据父级和MetaMdl查询
     * @param prtId
     * @param metaMdl
     * @return
     */
    Page<MetaCore> queryByPrtIdAndMetaMdl(String prtId, String metaMdl, Pageable pageable);

    /**
     * 查询出id在ids里面的
     * @param ids
     * @return
     */
    List<MetaCore> queryByIdIn(List<String> ids);
}
