menduo 7 лет назад
Родитель
Сommit
21974e0413

+ 4 - 4
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/ctrl/OnlineJudgeController.java

@@ -53,7 +53,7 @@ public class OnlineJudgeController {
     public String submit(@RequestBody OnlineJudgeVO onlineJudgeVO) {
 
         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);
         onlineJudgeVO.setUserId(userId);
         onlineJudgeVO.setMode(OnlineJudgeMode.SUBMIT);
@@ -63,7 +63,7 @@ public class OnlineJudgeController {
     @RequestMapping(value = "u/submission/{examId}/{caseId}")
     public SubmissionResultVO getSubmissionResult(@PathVariable("examId")Long examId, @PathVariable("caseId")Long caseId) {
         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);
         return  onlineJudgeLogic.getLatestAnswersForThisCaseAndExam(examId,caseId,userId);
     }
@@ -72,7 +72,7 @@ public class OnlineJudgeController {
     @RequestMapping(value = "u/execute",method = RequestMethod.POST)
     public String runWithInput(@RequestBody OnlineJudgeVO onlineJudgeVO) {
         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);
 
         onlineJudgeVO.setUserId(userId);
@@ -85,7 +85,7 @@ public class OnlineJudgeController {
     @RequestMapping(value = "u/pexecute",method = RequestMethod.POST)
     public String runWithManyInput(@RequestBody OnlineJudgeVO onlineJudgeVO) {
         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);
 
         onlineJudgeVO.setUserId(userId);