mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
在线管理资源完成情况修改
This commit is contained in:
@@ -191,16 +191,15 @@ public class StudyServiceImpl implements IStudyService{
|
||||
}else if (status == 1) {
|
||||
String sql = "select bsc.id,bsc.course_id,bsc.course_name,bsc.aname from boe_study_course bsc " +
|
||||
" where bsc.course_id = '"+courseId+"' and bsc.id not in(" +
|
||||
" 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+"' group by bsc.id" +
|
||||
" select item.study_id from boe_study_course_item item " +
|
||||
" where item.course_id = '" + courseId + "' and item.content_id = '"+ contentId+"' group by item.study_id" +
|
||||
" )";
|
||||
log.info("资源完成情况未开始sql"+sql);
|
||||
List<Object[]> list = scDao.sqlFindList(sql);
|
||||
log.info("资源完成情况未开始人数"+list);
|
||||
List<StudyCourseItem> item = new ArrayList<>();
|
||||
String sql2 = "select id, course_id, content_name, aname from boe_study_course_item where `status` !=2 and `status` !=9 and course_id = '" + courseId + "' and content_id = '"+contentId +"' group by id,course_id,content_id";
|
||||
for (Object[] objs : list) {
|
||||
String sql2 = "select id, course_id, content_name, aname from boe_study_course_item where `status` !=2 and `status` !=9 and course_id = '" + courseId + "' and content_id = '"+contentId +"' group by id,course_id,content_id";
|
||||
List<Object[]> itemList = scItemDao.sqlFindList(sql2);// 执行查询
|
||||
if (itemList.isEmpty()) {
|
||||
StudyCourseItem sc = new StudyCourseItem();
|
||||
@@ -225,7 +224,7 @@ public class StudyServiceImpl implements IStudyService{
|
||||
" 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+"' group by bsc.id" +
|
||||
" )group by bsc.id) a group by a.id";
|
||||
" )group by bsc.id) a group by a.id limit "+pageIndex+","+pageSize +"";
|
||||
log.info("资源完成情况全部sql"+sql2);
|
||||
List<Object[]> list = scDao.sqlFindList(sql2);
|
||||
log.info("资源完成情况人数"+list);
|
||||
|
||||
Reference in New Issue
Block a user