<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.3//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zw.platform.basic.repository.NewDictionaryDao">
    <select id="getList" resultType="com.zw.platform.basic.domain.DictionaryDO">
        SELECT *
        from zw_c_dictionary
        order by `type`, sort
    </select>

    <select id="findByType" resultType="com.zw.platform.basic.domain.DictionaryDO">
        select * from zw_c_dictionary where type = #{type}
    </select>

    <select id="getValueByCodeAndType" resultType="java.lang.String">
        SELECT `value` FROM zw_c_dictionary d WHERE d.`code` = #{code} AND d.type = #{type}
    </select>
</mapper>