打分列表排序按,自己没有评的→等待其他人评的→全部评分完成的

This commit is contained in:
wuchunlei
2025-05-26 13:12:56 +08:00
parent 28d8018e22
commit d712983311

View File

@@ -886,6 +886,7 @@ public class ClassEntityServiceImpl extends ServiceImpl<ClassEntityDao, ClassEnt
wrapper.selectAll(ClassTask.class);
wrapper.select("IF(LOCATE('"+"\""+ShiroUtils.getUId()+"\""+"', score_info)>0,1,0) as flag");
wrapper.orderByAsc("flag");
wrapper.orderByAsc(ClassTask::getScoreSuccess);
}
wrapper.eq(ClassTask::getType,params.get("type"));
}
@@ -1017,6 +1018,7 @@ public class ClassEntityServiceImpl extends ServiceImpl<ClassEntityDao, ClassEnt
wrapper.selectAll(ClassTaskAndQuesReply.class);
wrapper.select("IF(LOCATE('"+"\""+ShiroUtils.getUId()+"\""+"', score_info)>0,1,0) as flag");
wrapper.orderByAsc("flag");
wrapper.orderByAsc(ClassTaskAndQuesReply::getScoreSuccess);
wrapper.orderByAsc(ClassTaskAndQuesReply::getCreateTime);
Page<ClassTaskAndQuesReply> TaskAndQuesReplyPage = classTaskAndQuesReplyDao.selectPage(new Page<>(page, limit), wrapper);
for (ClassTaskAndQuesReply classTaskAndQuesReply :TaskAndQuesReplyPage.getRecords()){
@@ -1248,6 +1250,7 @@ public class ClassEntityServiceImpl extends ServiceImpl<ClassEntityDao, ClassEnt
replyWrap.selectAs(CourseCatalogueChapterEntity::getQuestions,"questions");
replyWrap.selectAs(ClassTaskAndQuesReply::getCreateTime,"createTime");
replyWrap.orderByAsc("flag");
replyWrap.orderByAsc("scoreSuccess");
replyWrap.orderByAsc("createTime");
Page<Map<String,Object>> replyPage = classTaskAndQuesReplyDao.selectMapsPage(new Page<>(page, limit), replyWrap);
for (Map<String,Object> map:replyPage.getRecords()){