mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-13 04:46:50 +08:00
成长路径图,考试同步,限制事务范围
This commit is contained in:
@@ -547,7 +547,8 @@ public class AloneExamApi extends ApiBaseController {
|
|||||||
//Float realScore=this.calculateScore(answer);
|
//Float realScore=this.calculateScore(answer);
|
||||||
//转化成百分数
|
//转化成百分数
|
||||||
//answer.setScore(this.calculateScore(detail));
|
//answer.setScore(this.calculateScore(detail));
|
||||||
service.submit(answer,scoreType,request);
|
service.submit(answer,scoreType);
|
||||||
|
service.syncExamScoreToCourseSuite(answer, request);
|
||||||
return success(map);
|
return success(map);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("提交答卷错误", e);
|
log.error("提交答卷错误", e);
|
||||||
|
|||||||
@@ -96,10 +96,16 @@ public interface IAloneExamService {
|
|||||||
* 提交考试
|
* 提交考试
|
||||||
*
|
*
|
||||||
* @param aea
|
* @param aea
|
||||||
|
*/
|
||||||
|
void submit(AloneExamAnswer aea, Integer scoreType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步考试成绩
|
||||||
|
* @param aea
|
||||||
* @param request
|
* @param request
|
||||||
*/
|
*/
|
||||||
void submit(AloneExamAnswer aea, Integer scoreType, HttpServletRequest request);
|
void syncExamScoreToCourseSuite(AloneExamAnswer aea, HttpServletRequest request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新答案
|
* 更新答案
|
||||||
* @param id
|
* @param id
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class AloneExamServiceImpl implements IAloneExamService{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public void submit(AloneExamAnswer aea, Integer scoreType, HttpServletRequest request){
|
public void submit(AloneExamAnswer aea, Integer scoreType){
|
||||||
//dao.update(aea);
|
//dao.update(aea);
|
||||||
aea.setStatus(AloneExamAnswer.STATUS_FINISH);
|
aea.setStatus(AloneExamAnswer.STATUS_FINISH);
|
||||||
LocalDateTime now=LocalDateTime.now();
|
LocalDateTime now=LocalDateTime.now();
|
||||||
@@ -120,9 +120,8 @@ public class AloneExamServiceImpl implements IAloneExamService{
|
|||||||
// //这种情况汶是不存在的
|
// //这种情况汶是不存在的
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
syncExamScoreToCourseSuite(aea, request);
|
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void syncExamScoreToCourseSuite(AloneExamAnswer aea, HttpServletRequest request) {
|
public void syncExamScoreToCourseSuite(AloneExamAnswer aea, HttpServletRequest request) {
|
||||||
String token = request.getHeader("Xboe-Access-Token");
|
String token = request.getHeader("Xboe-Access-Token");
|
||||||
if (StringUtils.isEmpty(token)) {
|
if (StringUtils.isEmpty(token)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user