From 7be0acf35002aac7e480e9693d607e5dda856567 Mon Sep 17 00:00:00 2001 From: zhaolongfei <2651195677@qq.com> Date: Fri, 9 Aug 2024 16:29:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E7=BA=BF=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=B5=84=E6=BA=90=E5=AE=8C=E6=88=90=E6=83=85=E5=86=B5?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E4=B8=8D=E8=83=BD=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xboe/school/study/service/impl/StudyServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java index 8f0136b9..4fc4f7c8 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyServiceImpl.java @@ -197,14 +197,14 @@ public class StudyServiceImpl implements IStudyService{ " left join boe_study_course_item item on bsc.course_id = item.course_id and bsc.id = item.study_id" + " where bsc.course_id = '"+courseId+"' and bsc.aname like '%"+name+"%' and bsc.id not in(" + " select item.study_id from boe_study_course_item item " + - " where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' and item.status = '1' and item.aname like '%"+name+"%' group by item.study_id" + + " where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' and item.aname like '%"+name+"%' group by item.study_id" + " ) group by bsc.id limit "+ pageIndex2+","+ pageSize+";"; String sql2 = "select count(*) as total from (select bsc.id,bsc.course_id,bsc.course_name,bsc.aname,item.content_id,0 as progress,1 as status from boe_study_course bsc " + " left join boe_study_course_item item on bsc.course_id = item.course_id and bsc.id = item.study_id" + " where bsc.course_id = '"+courseId+"' and bsc.aname like '%"+name+"%' and bsc.id not in(" + " select item.study_id from boe_study_course_item item " + - " where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' and item.status = '1' and item.aname like '%"+name+"%' group by item.study_id" + + " where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' and item.aname like '%"+name+"%' group by item.study_id" + " ) group by bsc.id) as total"; log.info("资源完成情况未开始sql"+sql); List list = scDao.sqlFindList(sql); @@ -241,7 +241,7 @@ public class StudyServiceImpl implements IStudyService{ "left join " + "(select bsc.id, bsc.course_id, bsc.course_name, bsc.aname, item.finish_time, item.progress, item.status " + "from boe_study_course bsc left join boe_study_course_item item on item.course_id = bsc.course_id and item.study_id = bsc.id " + - "where bsc.course_id = '" + courseId + "' and item.content_id = '" + contentId + "' and item.aname like '%"+name+"%' group by bsc.id) b " + + "where bsc.course_id = '" + courseId + "' and item.content_id = '" + contentId + "' and item.aname like '%"+name+"%' group by bsc.id) b " + "on a.course_id = b.course_id and a.id = b.id " + "group by a.id) as total"; log.info("资源完成情况全部sql"+sql);