mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-15 13:56:50 +08:00
修改考试
This commit is contained in:
@@ -6,6 +6,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.school.study.entity.StudyCourse;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
@@ -23,6 +25,7 @@ import com.xboe.school.study.service.IStudyExamService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Slf4j
|
||||
@@ -36,6 +39,8 @@ public class StudyExamApi extends ApiBaseController{
|
||||
@Autowired
|
||||
StringRedisTemplate redisTemplate;
|
||||
|
||||
@Resource
|
||||
private ThirdApi thirdApi;
|
||||
|
||||
/**2024.04.24
|
||||
* 矫正学员课程进度及完成状态
|
||||
@@ -93,7 +98,8 @@ public class StudyExamApi extends ApiBaseController{
|
||||
|
||||
//执行完毕 清除redis记录
|
||||
redisTemplate.delete(key);
|
||||
|
||||
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(exam.getStudyId() ,exam.getCourseId(), token);
|
||||
log.info("在线课学习记录"+allUserList);
|
||||
return success(exam);
|
||||
}catch(Exception e) {
|
||||
log.error("保存答卷信息错误",e);
|
||||
|
||||
@@ -51,8 +51,7 @@ public class StudyExamServiceImpl implements IStudyExamService{
|
||||
@Autowired
|
||||
StringRedisTemplate redisTemplate;
|
||||
|
||||
@Resource
|
||||
private ThirdApi thirdApi;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(StudyExam exam,String token) {
|
||||
@@ -131,8 +130,7 @@ public class StudyExamServiceImpl implements IStudyExamService{
|
||||
scItemDao.updateFieldById(exam.getStudyId(), "score",100.0f);
|
||||
}
|
||||
}
|
||||
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(exam.getStudyId() ,exam.getCourseId(), token);
|
||||
log.info("在线课学习记录"+allUserList);
|
||||
|
||||
//执行完毕 清除redis记录
|
||||
// redisTemplate.delete(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user