From 6ee55849eac9cd9d9183d155e80ebd454115a0c3 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 17 Aug 2021 10:28:11 +0800
Subject: [PATCH] 根据userID 查詢年齡,分數計算修改,年齡大於50岁的理论30%,实操70%,小于50岁的总分按理论实操各50%计算

---
 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