mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 09:56:47 +08:00
Merge branch 'zcwy0425-lyc' into 'master'
修复数据可指定课程id See merge request !80
This commit is contained in:
@@ -33,9 +33,9 @@ public class StudyExamApi extends ApiBaseController{
|
||||
* 矫正学员课程进度及完成状态
|
||||
* */
|
||||
@GetMapping("/correctStstus")
|
||||
public void correctStstus(){
|
||||
public void correctStstus(String courseId){
|
||||
log.info("---------矫正学员课程进度及完成状态--correctStstus---开始-----");
|
||||
sexamService.correctStstus();
|
||||
sexamService.correctStstus(courseId);
|
||||
log.info("---------矫正学员课程进度及完成状态--correctStstus---结束-----");
|
||||
}
|
||||
|
||||
|
||||
@@ -30,5 +30,5 @@ public interface IStudyExamService {
|
||||
*/
|
||||
List<StudyExam> getByStudyIdAndContentId(String studyId,String contentId);
|
||||
|
||||
void correctStstus();
|
||||
void correctStstus(String courseId);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import javax.transaction.Transactional;
|
||||
import com.xboe.core.orm.QueryBuilder;
|
||||
import com.xboe.system.user.entity.Message;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -110,24 +111,14 @@ public class StudyExamServiceImpl implements IStudyExamService{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void correctStstus() {
|
||||
public void correctStstus(String courseId) {
|
||||
|
||||
/* List<StudyExam> list = null;
|
||||
try {
|
||||
list = dao.getAllStudyExamByStudyId();
|
||||
log.info("------------list.size = " + list.size() + ",0 = " + list.get(0));
|
||||
|
||||
for(StudyExam item : list){
|
||||
log.info("-----------------CourseId = " + item.getCourseId() + " , StudyId = " + item.getStudyId() + " , StudentId = " + item.getStudentId());
|
||||
int totalContent = courseContentDao.getCount(item.getCourseId());
|
||||
scDao.finishCheck(item.getStudyId(),item.getCourseId(),totalContent);
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}*/
|
||||
|
||||
try {
|
||||
QueryBuilder builder = QueryBuilder.from(StudyExam.class);
|
||||
if (!StringUtils.isEmpty(courseId)){
|
||||
builder.addFilter(FieldFilters.eq("courseId", courseId));
|
||||
}
|
||||
builder.addGroupBy("studyId");
|
||||
List<StudyExam> list1 = dao.findList(builder.builder());
|
||||
log.info("------------QueryBuilder list1.size = " + list1.size() + ",0 = " + list1.get(0));
|
||||
|
||||
Reference in New Issue
Block a user