<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="io.renren.modules.sys.dao.SysDictDataDao">

    <select id="getDictDataList" resultType="io.renren.modules.sys.entity.DictData">
        select dict_type_id, dict_label, dict_value from sys_dict_data order by dict_type_id, sort
    </select>
    <select id="getDictDataByTypeAndDictValue" resultType="String">
        select d.dict_label as dictLabel from sys_dict_data d inner join sys_dict_type t
        on t.id=d.dict_type_id and t.dict_type=#{dictType} and d.dict_value=#{dictValue}
    </select>
    <select id="getDictDataByType" resultType="io.renren.modules.sys.entity.DictData">
        select d.dict_type_id, d.dict_label, d.dict_value from sys_dict_data d inner join sys_dict_type t
        on t.id=d.dict_type_id and t.dict_type=#{dictType}
    </select>


</mapper>