Skip to content

Commit

Permalink
更正控制器代码几处错误
Browse files Browse the repository at this point in the history
  • Loading branch information
李奕锋 committed Mar 30, 2017
1 parent 47df458 commit 589843b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/soecode/lyf/web/BookController.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ private String list(Model model) {
return "list";// WEB-INF/jsp/"list".jsp
}

// ajax json
@RequestMapping(value = "/{bookId}/detail", method = RequestMethod.GET)
@ResponseBody
private String detail(@PathVariable("bookId") Long bookId, Model model) {
if (bookId == null) {
return "redirect:/book/list";
Expand All @@ -53,9 +51,11 @@ private String detail(@PathVariable("bookId") Long bookId, Model model) {
return "detail";
}

// ajax json
@RequestMapping(value = "/{bookId}/appoint", method = RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
private Result<AppointExecution> appoint(@PathVariable("bookId") Long bookId, @Param("studentId") Long studentId) {
@ResponseBody
private Result<AppointExecution> appoint(@PathVariable("bookId") Long bookId, @RequestParam("studentId") Long studentId) {
if (studentId == null || studentId.equals("")) {
return new Result<>(false, "学号不能为空");
}
Expand Down

0 comments on commit 589843b

Please sign in to comment.