From 7df0c1546195b5fdf2228f976652afe1cf904233 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 21 Aug 2021 14:11:56 +0800
Subject: [PATCH] 成绩查询接口修改
---
src/main/java/org/springblade/modules/apply/controller/ApplyController.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/springblade/modules/apply/controller/ApplyController.java b/src/main/java/org/springblade/modules/apply/controller/ApplyController.java
index c6f1b8b..bf4fad0 100644
--- a/src/main/java/org/springblade/modules/apply/controller/ApplyController.java
+++ b/src/main/java/org/springblade/modules/apply/controller/ApplyController.java
@@ -102,7 +102,7 @@
if (1==user.getIsApply()){
return R.data(201,"已报名,不能重复报名");
}
- if (2==user.getIsApply() || -1==user.getIsApply() || 3==user.getIsApply()){
+ if (1!=user.getIsApply()){
//默认通过
apply.setApplyStatus(2);
//默认为未考试状态
@@ -430,7 +430,7 @@
return R.data(200,"取消报名成功");
}
}else {
- if (user.getIsApply()==2) {
+ if (user.getIsApply()!=1) {
return R.data(201,"尚未报名");
}
if(user.getIsApply()==1){
@@ -471,7 +471,7 @@
user.setIsApply(1);
userService.updateById(user);
} else {
- if (user.getIsApply() == 2 || -1==user.getIsApply() || 3==user.getIsApply()) {
+ if (user.getIsApply() != 1) {
Apply apply1 = new Apply();
apply1.setApplyStatus(2);
//默认为未考试状态
@@ -504,7 +504,7 @@
user.setIsApply(1);
userService.updateById(user);
} else {
- if (user.getIsApply() == 2 || -1==user.getIsApply() || 3==user.getIsApply()) {
+ if (user.getIsApply() != 1) {
Apply apply1 = new Apply();
apply1.setApplyStatus(2);
//默认为未考试状态
@@ -628,6 +628,7 @@
ExamScore examScore = new ExamScore();
examScore.setExamId(apply.getExamId().toString());
examScore.setUserId(apply.getUserId().toString());
+ examScore.setApplyId(apply.getId());
examScore.setExamTime(new Date());
//新增
examScoreService.save(examScore);
--
Gitblit v1.9.3