<?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="com.hdkj.lt.core.sys.dao.SysDictMapper">

    <select id="getDictSingleByTypeName" resultType="com.hdkj.lt.core.sys.model.po.DicSingle">
        SELECT sdd.dict_label as label,
               sdd.dict_value as value,
               sdd.dict_sort  as sort
        FROM sys_dict_type sdt
                 INNER JOIN sys_dict_data sdd
                            ON sdt.dict_type = sdd.dict_type AND sdt.dict_type = #{typeName,jdbcType=VARCHAR}
        ORDER BY sdd.dict_sort
    </select>

    <select id="getListByTypeName" resultType="com.ruoyi.system.api.domain.SysDictData">
        select *
        from sys_dict_data
        where dict_type in
        <foreach collection="typeNames" item="typeName" index="index" open="(" close=")" separator=",">
            #{typeName}
        </foreach>
    </select>


</mapper>
