<?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.tofly.feesapi.bmgl.mapper.SysChildCodeMapper">
    <select id="selectMaxId" resultType="decimal">
        SELECT NVL(MAX(to_number(CCID)),0) FROM SYS_CHILD_CODE
    </select>
    <select id="selectListMapParentCode" resultType="java.util.Map">
        select DISTINCT pcid, pcname
        from SYS_CHILD_CODE
        where pcname IS NOT NULL
        order by pcid
    </select>
    <select id="selectListMapChildCode" resultType="java.util.Map">
        select *
        from SYS_CHILD_CODE
        where pcId = #{pcId}
        order by cccode
    </select>
    <resultMap id="sysChildCodeMap" type="com.tofly.feesapi.bmgl.entity.SysChildCode">
        <id property="ccid" column="CCID"/>
        <result property="cccode" column="CCCODE"/>
        <result property="ccname" column="CCNAME"/>
        <result property="cccontent" column="CCCONTENT"/>
        <result property="isdisabled" column="ISDISABLED"/>
        <result property="pcid" column="PCID"/>
        <result property="pcname" column="PCNAME"/>
    </resultMap>


</mapper>
