| | |
| | | @Override |
| | | public List<MyLectureV> listLectureV(String learnerId, String chapterId, String keyword, Integer pageSize, |
| | | Integer pageNum, String type) { |
| | | StringBuffer hql1 = new StringBuffer("from MyLectureV where subjectId=? and id.userId=?"); |
| | | List<Object> args1 = CollectionUtils.newList(chapterId, learnerId); |
| | | List<MyLectureV> myLectureVList = findList(hql1.toString(), new Pager(pageSize, pageNum), args1, MyLectureV.class); |
| | | 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); |
| | | |
| | | StringBuffer hql = new StringBuffer("from MyLectureV where chapterId=? and id.userId=? order by lectureCreateTime desc"); |
| | | List<Object> args = CollectionUtils.newList(myLectureVList.get(0).getChapterId(), learnerId); |
| | | 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; |
| | | } |
| | | |
| | |
| | | |
| | | @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()); |
| | | } |
| | | |