package com.bizzan.bitrade.dao;

import com.bizzan.bitrade.entity.CountryVo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;

import com.bizzan.bitrade.entity.Country;

import java.util.List;

/**
 * @author 
 * @date 2020年02月10日
 */
public interface CountryDao extends JpaRepository<Country,String>,JpaSpecificationExecutor<Country>,QueryDslPredicateExecutor<Country> {
    @Query("select a from Country a where a.areaCode<>'86' order by a.sort")
    List<Country> findAllOrderBySort();

    Country findByZhName(String zhname);
}
