mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 04:16:51 +08:00
调试修复课程状态
This commit is contained in:
@@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
public class StudyExamDao extends BaseDao<StudyExam> {
|
public class StudyExamDao extends BaseDao<StudyExam> {
|
||||||
|
|
||||||
public List<StudyExam> getAllStudyExamByStudyId() {
|
public List<StudyExam> getAllStudyExamByStudyId() {
|
||||||
String hql1 = "SELECT course_id,study_id,student_id FROM boe_study_exam GROUP BY study_id";
|
String hql1 = "SELECT courseId,studyId,studentId FROM boe_study_exam GROUP BY study_id";
|
||||||
List<StudyExam> listByHql = super.findListByHql(hql1);
|
List<StudyExam> listByHql = super.findListByHql(hql1);
|
||||||
return listByHql;
|
return listByHql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import java.util.List;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
|
import com.xboe.core.orm.QueryBuilder;
|
||||||
|
import com.xboe.system.user.entity.Message;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -110,7 +112,19 @@ public class StudyExamServiceImpl implements IStudyExamService{
|
|||||||
@Override
|
@Override
|
||||||
public void correctStstus() {
|
public void correctStstus() {
|
||||||
|
|
||||||
List<StudyExam> list = dao.getAllStudyExamByStudyId();
|
List<StudyExam> list = null;
|
||||||
|
try {
|
||||||
|
list = dao.getAllStudyExamByStudyId();
|
||||||
|
} catch (Exception exception) {
|
||||||
|
exception.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder builder = QueryBuilder.from(StudyExam.class);
|
||||||
|
builder.addGroupBy("studyId");
|
||||||
|
builder.addOrder(OrderCondition.desc("msgTime"));
|
||||||
|
List<StudyExam> list1 = dao.findList(builder.builder());
|
||||||
|
|
||||||
|
log.info("QueryBuilder list1.size = " + list1.size() + ",0 = " + list1.get(0));
|
||||||
log.info("list.size = " + list.size() + ",0 = " + list.get(0));
|
log.info("list.size = " + list.size() + ",0 = " + list.get(0));
|
||||||
for(StudyExam item : list){
|
for(StudyExam item : list){
|
||||||
log.info("CourseId = " + item.getCourseId() + " , StudyId = " + item.getStudyId() + " , StudentId = " + item.getStudentId());
|
log.info("CourseId = " + item.getCourseId() + " , StudyId = " + item.getStudyId() + " , StudentId = " + item.getStudentId());
|
||||||
|
|||||||
Reference in New Issue
Block a user