Commit 056180ef authored by luzhuang's avatar luzhuang

fileSize

parent 9b381171
......@@ -45,22 +45,21 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
* @param param
* @return
*/
@Select("<script>SELECT\n" +
"\tbc.*,\n" +
"\tbf.file_size AS fileSize \n" +
"FROM\n" +
"\tb_chapter bc\n" +
"\tLEFT JOIN b_file bf ON bf.chapter_id = bc.business_id \n" +
"WHERE\n" +
"\tbc.del_flag = 0 \n" +
"\tAND bc.flag = 1 \n" +
"\tAND bc.pid = - 1 \n" +
"\tAND bc.lesson_id = #{lessonId}\n" +
"\t\n" +
"\tAND bc.corp_id = #{corpId}\n" +
"\t\n" +
"ORDER BY\n" +
"\tsort ASC</script>")
@Select("<script>" +
"SELECT " +
"bc.*, " +
"bf.file_size " +
"FROM " +
"b_chapter bc " +
"LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id " +
"WHERE " +
"bc.del_flag = 0 " +
"AND bc.flag = 1 " +
"AND bc.pid = - 1 " +
"AND bc.lesson_id = #{lessonId} " +
"AND bc.corp_id = #{corpId} " +
"ORDER BY sort ASC" +
"</script>")
@ResultMap(value = "SupperChildListResultMap")
List<QueryChapterListResDTO> queryBChapters(Map<String, Object> param);
......@@ -80,7 +79,9 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
" bc.lesson_id, " +
" bc.sort," +
" bf.video_url AS videoUrl, " +
" bf.file_name AS fileName " +
" bf.file_name AS fileName ," +
" bf.file_time AS fileTime ," +
" bf.file_size AS fileSize " +
" FROM " +
" b_chapter bc " +
" LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id " +
......
......@@ -39,10 +39,11 @@
<result column="is_complete" jdbcType="VARCHAR" property="isComplete"/>
<result column="file_name" jdbcType="VARCHAR" property="fileName"/>
<result column="course_time" jdbcType="VARCHAR" property="courseTime"/>
<result column="file_size" jdbcType="VARCHAR" property="fileSize"/>
<result column="corp_id" jdbcType="VARCHAR" property="corpId"/>
</resultMap>
<!--教师和管理员使用这个-->
<resultMap id="SupperChildListResultMap" type="org.rcisoft.business.bchapter.dto.QueryChapterListResDTO" extends="BaseResultMapDTO">
<association column="business_id" property="childList" select="org.rcisoft.business.bchapter.dao.BChapterRepository.queryBChaptersByPid"></association>
</resultMap>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment