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

import com.liangjian.dataplatform.member.entity.po.tertiary.DataDictory;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

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

/**
 * @Author: 黄树文
 * @Date: 2019/11/29 11:39
 */
public interface DataDictoryRepository  extends JpaRepository<DataDictory, String>, JpaSpecificationExecutor<DataDictory> {


    @Query(value = "select * from Mall.dbo.DataDictory where ParentId in (785,786);", nativeQuery = true)
    List<DataDictory> findAllOriginType();


    @Query(value = "SELECT *  FROM DataDictory  WHERE parentId IN (:list) AND isHide=0;", nativeQuery = true)
    List<DataDictory> findInParentIdAndIsHide(@Param("list") List<Integer> list);

}
