<?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.jeeplus.assess.program.configuration.fileDict.mapper.ProgramFileDictMapper">

    <resultMap id="BaseResultMap" type="com.jeeplus.assess.program.configuration.fileDict.service.dto.ProgramFileDictDTO">
            <id property="id" column="id" jdbcType="VARCHAR"/>
            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
            <result property="createTime" column="create_date" jdbcType="TIMESTAMP"/>
            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
            <result property="updateTime" column="update_date" jdbcType="TIMESTAMP"/>
            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
            <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
            <result property="name" column="name" jdbcType="VARCHAR"/>
            <result property="sort" column="sort" jdbcType="VARCHAR"/>
            <result property="type" column="type" jdbcType="VARCHAR"/>
            <result property="size" column="size" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        pfd.id,
        pfd.create_by_id,
        pfd.create_time,
        pfd.update_by_id,
        pfd.update_time,
        pfd.del_flag,
        pfd.remarks,
        pfd.parent_id,
        pfd.name,
        pfd.sort,
        pfd.type,
        pfd.size
    </sql>

    <select id="findList" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"></include>
        from program_file_dict pfd
        ${ew.customSqlSegment}
    </select>

    <select id="queryById" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"></include>
        from program_file_dict pfd
        where pfd.del_flag = '0' and pfd.id = ${id}
    </select>

</mapper>
