From abef4c963e8c12d8dc19fce570abe75bbc2e14fa Mon Sep 17 00:00:00 2001 From: zhaolongfei <2651195677@qq.com> Date: Tue, 23 Jul 2024 17:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=AE=A1=E7=90=86=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=AE=8C=E6=88=90=E6=83=85=E5=86=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xboe/school/study/service/impl/StudyServiceImpl.java | 7 ++++--- 1 file changed, 4 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 6a482b19..a3e2390a 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 @@ -186,9 +186,10 @@ public class StudyServiceImpl implements IStudyService{ }else if(status==2){ query.addFilter(FieldFilters.eq("status",9)); }else if (status == 1) { - String sql = "select bsc.id, bsc.course_id, bsc.course_name, bsc.aname from boe_study_course bsc " + - " left join boe_study_course_item item on item.course_id = bsc.course_id " + - " where bsc.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' and bsc.`status` !=9 and item.`status` !=2"; + String sql = "select bsc.* from boe_study_course bsc where bsc.course_id = '"+courseId+"' and bsc.id = " + + " (select bsc.id 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+"')"; List list = scDao.sqlFindList(sql); List item = new ArrayList<>(); for (Object[] objs : list) {