fixed damaged deleting slots, see #5
This commit is contained in:
@@ -30,20 +30,20 @@ public class SlotController extends CommonController {
|
||||
}
|
||||
|
||||
@GetMapping("/slot/{id}")
|
||||
public String load(@PathVariable Integer id, Model model) {
|
||||
public String load(@PathVariable("id") Integer id, Model model) {
|
||||
model.addAttribute("bean", id == null ? new SlotBean() : service.loadSlot(id));
|
||||
model.addAttribute("hasLesson", service.slotHasLesson(id));
|
||||
return "/slot/item";
|
||||
}
|
||||
|
||||
@GetMapping("/slot/{id}/delete")
|
||||
public String loadEnsurance(@PathVariable Integer id, Model model) {
|
||||
public String loadEnsurance(@PathVariable("id") Integer id, Model model) {
|
||||
model.addAttribute("bean", service.loadDeletableSlot(id));
|
||||
return "/slot/delete";
|
||||
}
|
||||
|
||||
@GetMapping("/slot/{id}/destroy")
|
||||
public String destroy(@PathVariable Integer id, Model model) {
|
||||
public String destroy(@PathVariable("id") Integer id, Model model) {
|
||||
service.removeSlot(id);
|
||||
return "redirect:/";
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class SlotRepository {
|
||||
.selectFrom(T_LESSON)
|
||||
.where(T_LESSON.FK_SLOT.eq(slotId));
|
||||
// @formatter:on
|
||||
LOGGER.trace(sql);
|
||||
LOGGER.info(sql);
|
||||
return sql.fetch().size() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user