|
@@ -53,7 +53,7 @@ public class OnlineJudgeController {
|
|
public String submit(@RequestBody OnlineJudgeVO onlineJudgeVO) {
|
|
public String submit(@RequestBody OnlineJudgeVO onlineJudgeVO) {
|
|
|
|
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
- if(userId == null) throw new HttpBadRequestException("no user found, login first");
|
|
|
|
|
|
+ if(userId == null) throw new HttpBadRequestException("请登录后操作~");
|
|
log.info("user:{}",userId);
|
|
log.info("user:{}",userId);
|
|
onlineJudgeVO.setUserId(userId);
|
|
onlineJudgeVO.setUserId(userId);
|
|
onlineJudgeVO.setMode(OnlineJudgeMode.SUBMIT);
|
|
onlineJudgeVO.setMode(OnlineJudgeMode.SUBMIT);
|
|
@@ -63,7 +63,7 @@ public class OnlineJudgeController {
|
|
@RequestMapping(value = "u/submission/{examId}/{caseId}")
|
|
@RequestMapping(value = "u/submission/{examId}/{caseId}")
|
|
public SubmissionResultVO getSubmissionResult(@PathVariable("examId")Long examId, @PathVariable("caseId")Long caseId) {
|
|
public SubmissionResultVO getSubmissionResult(@PathVariable("examId")Long examId, @PathVariable("caseId")Long caseId) {
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
- if(userId == null) throw new HttpBadRequestException("no user found, login first");
|
|
|
|
|
|
+ if(userId == null) throw new HttpBadRequestException("请登录后操作~");
|
|
log.info("user:{}",userId);
|
|
log.info("user:{}",userId);
|
|
return onlineJudgeLogic.getLatestAnswersForThisCaseAndExam(examId,caseId,userId);
|
|
return onlineJudgeLogic.getLatestAnswersForThisCaseAndExam(examId,caseId,userId);
|
|
}
|
|
}
|
|
@@ -72,7 +72,7 @@ public class OnlineJudgeController {
|
|
@RequestMapping(value = "u/execute",method = RequestMethod.POST)
|
|
@RequestMapping(value = "u/execute",method = RequestMethod.POST)
|
|
public String runWithInput(@RequestBody OnlineJudgeVO onlineJudgeVO) {
|
|
public String runWithInput(@RequestBody OnlineJudgeVO onlineJudgeVO) {
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
- if(userId == null) throw new HttpBadRequestException("no user found, login first");
|
|
|
|
|
|
+ if(userId == null) throw new HttpBadRequestException("请登录后操作~");
|
|
log.info("user:[{}],params:[{}]",userId,onlineJudgeVO);
|
|
log.info("user:[{}],params:[{}]",userId,onlineJudgeVO);
|
|
|
|
|
|
onlineJudgeVO.setUserId(userId);
|
|
onlineJudgeVO.setUserId(userId);
|
|
@@ -85,7 +85,7 @@ public class OnlineJudgeController {
|
|
@RequestMapping(value = "u/pexecute",method = RequestMethod.POST)
|
|
@RequestMapping(value = "u/pexecute",method = RequestMethod.POST)
|
|
public String runWithManyInput(@RequestBody OnlineJudgeVO onlineJudgeVO) {
|
|
public String runWithManyInput(@RequestBody OnlineJudgeVO onlineJudgeVO) {
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
Long userId = (Long)SecurityUtils.getSubject().getSession().getAttribute("userId");
|
|
- if(userId == null) throw new HttpBadRequestException("no user found, login first");
|
|
|
|
|
|
+ if(userId == null) throw new HttpBadRequestException("请登录后操作~");
|
|
log.info("user:[{}],params:[{}]",userId,onlineJudgeVO);
|
|
log.info("user:[{}],params:[{}]",userId,onlineJudgeVO);
|
|
|
|
|
|
onlineJudgeVO.setUserId(userId);
|
|
onlineJudgeVO.setUserId(userId);
|