修复提示框信息无法传递的问题

Signed-off-by: Chenx221 <chenx221@yandex.com>
This commit is contained in:
Chenx221 2023-06-15 11:04:05 +08:00
parent 2cd656e4c0
commit 1da899ccf7
3 changed files with 5 additions and 7 deletions

View File

@ -44,17 +44,11 @@
<li><a class="dropdown-item" href="/student/queryinfo">学生信息查询</a></li>
<li><a class="dropdown-item" href="/student/modstep1">学生信息修改(旧)</a></li>
<li><a class="dropdown-item" href="/student/infomodv2">学生信息修改</a></li>
<li><a class="dropdown-item disabled"><del>自己输入sql语句查</del>(划掉,没做)</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="/score/all">成绩查看</a></li>
<li><a class="dropdown-item" href="/score/infomodv2">成绩管理</a></li>
<li><a class="dropdown-item" href="#">学生成绩管理</a></li>
<li>
<hr class="dropdown-divider" />
</li>
<li><a class="dropdown-item" href="#">学生选课管理</a></li>
</ul>
</li>
<li class="nav-item dropdown">

View File

@ -78,13 +78,17 @@ public class UserController {
}
@RequestMapping(path = "/user/usermanage", method = {RequestMethod.GET})
public String userManage(Model model) {
public String userManage(@RequestParam(value = "successMessage", required = false, defaultValue = "null") String successMessage,
@RequestParam(value = "errorMessage", required = false, defaultValue = "null") String errorMessage,
Model model) {
String username = new UsernameHelper().getCurrentUsername();
if (username != null) {
model.addAttribute("username", username);
}
List<User> userList = userMapper.getAllUsers();
model.addAttribute("userList", userList);
model.addAttribute("successMessage", successMessage);
model.addAttribute("errorMessage", errorMessage);
return "usermanage";
}