diff --git a/src/main/java/com/peteralbus/controller/StudentController.java b/src/main/java/com/peteralbus/controller/StudentController.java index da2ee5e..2ea9e88 100644 --- a/src/main/java/com/peteralbus/controller/StudentController.java +++ b/src/main/java/com/peteralbus/controller/StudentController.java @@ -190,6 +190,10 @@ public class StudentController { return "error:未找到该小组"; } + if(groupService.getMemberCount(groupId)>=activityService.getActivityById(group.getActivityId()).getMaxPeople()) + { + return "toManyMembers"; + } int result=participateService.participateWithOldGroup(group); if(result>0) { diff --git a/src/main/java/com/peteralbus/controller/UserController.java b/src/main/java/com/peteralbus/controller/UserController.java index 226c114..b706875 100644 --- a/src/main/java/com/peteralbus/controller/UserController.java +++ b/src/main/java/com/peteralbus/controller/UserController.java @@ -62,6 +62,7 @@ public class UserController token.setRememberMe(rememberMe); try { subject.login(token); + subject.getSession().setTimeout(86400000); } catch (IncorrectCredentialsException ie){ return "登陆失败:密码错误!"; diff --git a/src/main/resources/applicationContext.xml b/src/main/resources/applicationContext.xml index e48fc65..735aad2 100644 --- a/src/main/resources/applicationContext.xml +++ b/src/main/resources/applicationContext.xml @@ -143,13 +143,11 @@ - - @@ -161,6 +159,7 @@ + /iview/**=anon /vue/**=anon /css/**=anon @@ -173,9 +172,7 @@ /jsp/account/** =anon /logout = logout - /** = authc - - + /** = user diff --git a/src/main/webapp/jsp/student/applyActivity.jsp b/src/main/webapp/jsp/student/applyActivity.jsp index eecb6fb..56391d5 100644 --- a/src/main/webapp/jsp/student/applyActivity.jsp +++ b/src/main/webapp/jsp/student/applyActivity.jsp @@ -275,6 +275,10 @@ { this.$message.error('创建小组失败!') } + else if(res.data==="toManyMembers") + { + this.$message.error('该小组人数已满!') + } else { location.href="/student/manageActivity?activityId="+this.activity.activityId