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

import com.liangjian.dataplatform.member.entity.po.fourthly.Payplatform;
import com.liangjian.dataplatform.member.entity.po.fourthly.Terminaldoc;
import com.liangjian.dataplatform.member.entity.po.tertiary.DataDictory;
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;

public interface TerminaldocRepository extends JpaRepository<Terminaldoc, String>, JpaSpecificationExecutor<Terminaldoc> {

    @Query(value = "select Text as TerminalName,[Value] as TerminalCode,[Key] as TerminalDesc,cast(Id as varchar) as SourceTerminalKey,ParentId as ParentTerminalKey,SortKey as SourceTerminalSort from  Mall..DataDictory b where  b.ParentId IN (785,786) AND b.IsHide=0", nativeQuery = true)
    List<Terminaldoc> getTerms();
}
