派生自 projectDept/qhighschool

11
yn147
2022-11-21 e2f63040ba839fb0045360b4971ebbb06a79d55d
src/main/java/com/qxueyou/scc/admin/classes/service/impl/ClassLectureService.java
@@ -95,20 +95,22 @@
    @Override
    public List<MyLectureV> listLectureV(String learnerId, String chapterId, String keyword, Integer pageSize,
                                         Integer pageNum, String type) {
        StringBuffer hql = new StringBuffer("from MyLectureV where subjectId=? and id.userId=? order by lectureCreateTime desc");
//        StringBuffer hql = new StringBuffer("from MyLectureV where chapterId=? and id.userId=? and status=? order by lectureCreateTime desc");
//        List<Object> args = CollectionUtils.newList(chapterId, learnerId,ClsSubjectLecture.STATUS_DRAFT);
        StringBuffer hql = new StringBuffer("from MyLectureV where subjectId=? and id.userId=?");
        List<Object> args = CollectionUtils.newList(chapterId, learnerId);
        List<MyLectureV> myLectureVList = findList(hql.toString(), new Pager(pageSize, pageNum), args, MyLectureV.class);
        if(myLectureVList.size() < 1){
        }else {
            hql = new StringBuffer("from MyLectureV where chapterId=? and id.userId=? order by lectureCreateTime desc");
            args = CollectionUtils.newList(myLectureVList.get(0).getChapterId(), learnerId);
        }
        if (StringUtils.isNotEmpty(type)) {
            hql.append(" and lectureType=?");
            args.add(type);
        }
        List<MyLectureV> result = findList(hql.toString(), new Pager(pageSize, pageNum), args, MyLectureV.class);
        return result;
    }
@@ -565,7 +567,7 @@
    @Override
    public Result doStudy(String clsLectureId, Double from, Double to) {
        return progressService.addProgress(Progress.PROGRESS_TYPE_LECTURE, clsLectureId, from.intValue(), to.intValue(),
        return progressService.addProgress(Progress.PROGRESS_TYPE_LECTURE, clsLectureId, from.doubleValue(), to.doubleValue(),
                ClientUtils.getUserId());
    }