package thyyxxk.webserver.dao.his.dictionary;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import thyyxxk.webserver.entity.dictionary.CodeName;

import java.util.List;

@Mapper
public interface FetchDictionariesDao {

    @Select("select rtrim(code) as code, rtrim(name) as name from zd_country_code order by sort_no,code")
    List<CodeName> selectCountries();

    @Select("select rtrim(code) as code,rtrim(name) as name from zd_nation_code where wjw_code is not null order by wjw_code")
    List<CodeName> selectNations();

    @Select("select rtrim(code) as code, rtrim(name) as name from zy_zd_relative_code order by code")
    List<CodeName> selectRelations();
}
