Newer
Older
huludao / src / main / resources / mapper / project / XnFileMapper.xml
<?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.xf.huludao.project.dao.XnFileMapper" >
    <resultMap id="BaseResultMap" type="com.xf.huludao.project.entity.XnFile">
        <id property="fileNumber" column="file_number"/>
        <result property="projectNodeNumber" column="project_node_number"/>
        <result property="fileName" column="file_name"/>
        <result property="createDateTime" column="create_date_time"/>
        <result property="state" column="node_state"/>
        <result property="fileType" column="file_type"/>
        <result property="fileAddress" column="fileAddress"/>
        <result property="user" column="user"/>
        <result property="fileTitle" column="file_title"/>
        <result property="remark" column="remark"/>
    </resultMap>

    <sql id="Base_Column_List">
             xf.file_number,
             xf.project_node_number,
             xf.file_name,
             xf.create_date_time,
             pnc.node_state,
             xf.file_type,
             xf.file_address as fileAddress,
             xf.user,
             xf.file_title,
             xf.remark
          </sql>

    <select id="selectFileInfoByProjectNodeNumber" resultMap ="BaseResultMap">
        select <include refid="Base_Column_List"/>
        from xn_file xf
        LEFT JOIN project_node_config pnc
            on xf.project_node_number = pnc.project_node_no
        WHERE
        pnc.node_no = #{nodeNumber} and pnc.project_no = #{projectNo}


    </select>



</mapper>