<?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.dxhy.admin.sys.dao.SysDictdetaDao">
    <select id="queryDictDetaId" resultType="long">
        select count(1)
        from sys_dictdeta
        where dicttype = #{id}
    </select>

    <select id="queryDictDeta" resultType="com.dxhy.admin.sys.entity.SysDictdetaEntity">
        select *
        from sys_dictdeta d
        where d.dictid = (select max(p.dictid) from sys_dictdeta p where d.dicttypecode = p.dicttypecode)
    </select>
</mapper>
