@@ -89,21 +89,21 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
* @param
* @return
*/
@Select("<script>SELECT\n"+
"\tt1.chapter_name,t2.automatic,t5.class_name,t3.`code`,t6.`name`,t2.score,t3.business_id as sId,t2.business_id as scoreId\n"+
"FROM\n"+
"\tb_chapter t1\n"+
"\tLEFT JOIN b_r_student_chapter t2 ON t2.chapter_id = t1.`business_id`\n"+
"\tLEFT JOIN b_student t3 ON t2.student_id = t3.`business_id`\n"+
"\tLEFT JOIN b_r_class_student t4 ON t3.`code` = t4.student_code\n"+
"\tLEFT JOIN b_class t5 ON t5.`code` = t4.class_code\n"+
"\tLEFT JOIN s_user t6 ON t6.login_name = t3.`code`\n"+
@Select("<script>SELECT"+
" t1.chapter_name,t2.automatic,t5.class_name,t3.`code`,t6.`name`,t2.score,t3.business_id as sId,t2.business_id as scoreId "+
"FROM"+
" b_chapter t1 "+
" LEFT JOIN b_r_student_chapter t2 ON t2.chapter_id = t1.`business_id` "+
" LEFT JOIN b_student t3 ON t2.student_id = t3.`business_id` "+
" LEFT JOIN b_r_class_student t4 ON t3.`code` = t4.student_code "+
" LEFT JOIN b_class t5 ON t5.`code` = t4.class_code "+
" LEFT JOIN s_user t6 ON t6.login_name = t3.`code` "+
"WHERE t1.del_flag='0' and t1.flag='1' and t2.is_complete='1' "+
"\nand t2.`score` != -1"+
"\tand t1.business_id = #{dto.chapterId}\n"+
"<if test=\"dto.stuInfo !=null and dto.stuInfo !=''\">AND (t3.code like CONCAT('%',#{dto.stuInfo}.'%') or t6.name like CONCAT('%',#{dto.stuInfo}.'%')) </if> \n"+
"<if test=\"dto.classInfo !=null and dto.classInfo !=''\">AND t5.code like like CONCAT('%',#{dto.classInfo}.'%') </if> \n"+
"and t2.`score` != -1"+
" and t1.business_id = #{dto.chapterId} "+
"<if test=\"dto.stuInfo !=null and dto.stuInfo !=''\">AND (t3.code like CONCAT('%',#{dto.stuInfo}.'%') or t6.name like CONCAT('%',#{dto.stuInfo}.'%')) </if> "+