<?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.hc.gpbusiness.mapper.WebModulesMapper">

    <resultMap type="com.hc.gpbusiness.model.WebModules" id="ModulesMap">
        <result property="moduleId" column="module_id" jdbcType="INTEGER"/>
        <result property="parentId" column="parent_id" jdbcType="INTEGER"/>
        <result property="moduleName" column="module_name" jdbcType="VARCHAR"/>
        <result property="moduleType" column="module_type" jdbcType="INTEGER"/>
        <result property="moduleIndex" column="module_index" jdbcType="INTEGER"/>
        <result property="createTime" column="create_time" jdbcType="BIGINT"/>
        <result property="updateTime" column="update_time" jdbcType="BIGINT"/>
    </resultMap>

    <sql id="Base_Column_List">
           module_id,
           parent_id,
           module_name,
           module_type,
           module_index,
           create_time,
           update_time
        </sql>


    <select id="queryByParentId" resultType="com.hc.gpbusiness.dto.WebModulesDto">
        SELECT
        <include refid="Base_Column_List"/>
        FROM `web_modules`
        WHERE parent_id = #{parentId}
    </select>



</mapper>