From 767f8e4c5b8bdb9b87c7529fe01220f7fa3671b1 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 16 Aug 2021 21:52:17 +0800
Subject: [PATCH] 1.取消报名接口修改, 2.批量报名接口修改
---
src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java b/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
index 941f8f7..07a59a0 100644
--- a/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
+++ b/src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
@@ -115,7 +115,7 @@
user1.setIsApply(1);
userService.updateById(user1);
}else {
- if (user1.getIsApply()==2) {
+ if (user1.getIsApply()==2 || -1==user.getIsApply()) {
Apply apply1 = new Apply();
apply1.setApplyStatus(2);
//默认为未考试状态
@@ -423,4 +423,14 @@
trainingRegistrationService.updateById(trainingRegistration);
}
}
+
+ /**
+ * 查询报名信息,取最新的一条(即当前userId,)applyId最大的一条记录
+ * @param userId
+ * @return
+ */
+ @Override
+ public Apply getMaxApplyIdByUserIdInfo(Long userId) {
+ return baseMapper.getMaxApplyIdByUserIdInfo(userId);
+ }
}
--
Gitblit v1.9.3