<?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.xhkjedu.sclass.mapper.classroom.ClassroomPaperFileMapper">
    <!-- 根据作业id获取作业附件 -->
    <select id="listObjsByPaperid" resultType="com.xhkjedu.sclass.model.classroom.TClassroomPaperFile">
        SELECT pfid,paperid,filepath,fileclass,fileorder,createtime
        FROM
        <if test="qctype==2">t_paper_file</if>
        <if test="qctype==3">t_classroom_paper_file</if>
        WHERE paperid=#{paperid} ORDER BY fileorder asc
    </select>
    <select id="listFilepath" resultType="com.xhkjedu.sclass.model.classroom.TClassroomPaperFile">
        SELECT paperid,filepath FROM t_classroom_paper_file
        WHERE paperid in
        <foreach collection="paperids" item="paperid" index="index" open="(" separator="," close=")">
            ${paperid}
        </foreach>
        ORDER BY fileorder asc
    </select>
</mapper>
