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