From e8a77a66d1f7defec5a0de5f9a425acc249f8609 Mon Sep 17 00:00:00 2001 From: DyCTaTOR <125912249+DyCTaTOR@users.noreply.github.com> Date: Tue, 21 May 2024 00:46:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D0=BD=D0=BE=D0=B2=D0=BE=D1=81=D1=82=D0=B8?= =?UTF-8?q?=20+=20=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB=D0=BA=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data.mv.db | Bin 753664 -> 811008 bytes .../directions/api/DirectionsController.java | 103 ++++++++++++++---- .../example/demo/news/api/NewsController.java | 1 + .../resources/templates/direction-edit.html | 53 +++++++++ src/main/resources/templates/directions.html | 27 ++--- src/main/resources/templates/new-edit.html | 9 +- src/main/resources/templates/news.html | 2 + 7 files changed, 157 insertions(+), 38 deletions(-) create mode 100644 src/main/resources/templates/direction-edit.html diff --git a/data.mv.db b/data.mv.db index 3a72557059652c1bfeb662fb37f70a6289ecf3e2..6302d81a0794cf35fd1337c34693dc96e6bf8d6e 100644 GIT binary patch delta 16461 zcmeHO3v?XSd7hcw*?FvN`60`)u;rDAg=MeJJa%Sh6hA~b5HPlp0n=a(#xt`s;231% z2d|K<3>2G3!A8`V(#DA?&=APMsuM3XJVZzd5GTlmQuB;`dg7BbZ3@`!Nl#DX{`byv zrIjrVv?Pbs(cZl~uYd2{`+xuc{onNV&g~tLx3#5grMP`Y`y^=c-c{~K=Sp{dr|g(& zK{t*5RX?gf?hd!C8nfAuJ2SN zPl6BYI(4a#U%z(k#!kgC90^{EDmiL?2tJn5);&b)5*Kh39 zy!^(sPN(cjR$u>fXY(R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CwbZE|DFBZ7NW!-;vKn4Mp3?zN%U4+73~o1onvxmg;2${{1%;& zWVK++EcFKj4zR%e4m-51>rmdIY3WjkPp(68xZ@jXI+TAbd!g+%RKsDDraT6LuMlxt zLb;Rcyc<^1kopQOc4x~yp4y!EGRVWHW+{Z%Ovrg6c6m+wSYFq<;^_p%dEuaBQ*V^H T+~yf9YN%G^Rx>7PC@uXLa0N%i diff --git a/src/main/java/com/example/demo/directions/api/DirectionsController.java b/src/main/java/com/example/demo/directions/api/DirectionsController.java index 19f2106..c8ee00b 100644 --- a/src/main/java/com/example/demo/directions/api/DirectionsController.java +++ b/src/main/java/com/example/demo/directions/api/DirectionsController.java @@ -1,21 +1,31 @@ package com.example.demo.directions.api; +import java.util.List; import java.util.Map; import org.modelmapper.ModelMapper; +import org.modelmapper.TypeToken; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.example.demo.core.api.PageAttributesMapper; import com.example.demo.core.configuration.Constants; +import com.example.demo.department.api.DepartmentDto; import com.example.demo.department.service.DepartmentService; import com.example.demo.directions.model.DirectionsEntity; import com.example.demo.directions.model.DirectionsGrouped; import com.example.demo.directions.service.DirectionsService; +import jakarta.validation.Valid; + @Controller @RequestMapping(DirectionsController.URL) public class DirectionsController { @@ -23,6 +33,7 @@ public class DirectionsController { private static final String DIRECTIONS_VIEW = "directions"; private static final String DIRECTIONS_EDIT_VIEW = "direction-edit"; private static final String DIRECTIONS_ATTRIBUTE = "directions"; + private static final String DEPARTMENT_ATTRIBUTE = "departments"; private static final String PAGE_ATTRIBUTE = "page"; private final DirectionsService directionsService; private final ModelMapper modelMapper; @@ -49,6 +60,10 @@ public class DirectionsController { return modelMapper.map(entity, DirectionsGroupedDto.class); } + private List getDepartments(){ + return modelMapper.map(departmentService.getAll(), new TypeToken>(){}.getType()); + } + @GetMapping public String getAllWithDepartment( @RequestParam(name=PAGE_ATTRIBUTE, defaultValue = "0") int page, @@ -59,32 +74,72 @@ public class DirectionsController { model.addAttribute(PAGE_ATTRIBUTE, page); return DIRECTIONS_VIEW; } + + @GetMapping("/edit/") + public String create(Model model, + @RequestParam(name = PAGE_ATTRIBUTE, defaultValue = "0") int page) { + model.addAttribute(DIRECTIONS_ATTRIBUTE, new DirectionsGroupedDto()); + model.addAttribute(DEPARTMENT_ATTRIBUTE, getDepartments()); + model.addAttribute(PAGE_ATTRIBUTE, page); + return DIRECTIONS_EDIT_VIEW; + } - // @GetMapping - // public PageDto getAll( - // @RequestParam(name = "departmentId", defaultValue = "0") Long departmentId, - // @RequestParam(name = "page", defaultValue = "0") int page, - // @RequestParam(name = "size", defaultValue = Constants.DEFAULT_PAGE_SIZE) int size) { - // return PageDtoMapper.toDto(directionsService.getAll(departmentId, page, size), this::toDto); - // } + @PostMapping("/edit/") + public String create( + @ModelAttribute(name = DIRECTIONS_ATTRIBUTE) @Valid DirectionsDto direction, + @RequestParam(name = PAGE_ATTRIBUTE, defaultValue = "0") int page, + BindingResult bindingResult, + Model model, + RedirectAttributes redirectAttributes) { + if (bindingResult.hasErrors()) { + model.addAttribute(PAGE_ATTRIBUTE, page); + return DIRECTIONS_EDIT_VIEW; + } + redirectAttributes.addAttribute(PAGE_ATTRIBUTE, page); + directionsService.create(toEntity(direction)); + return Constants.REDIRECT_VIEW + URL; + } - // @GetMapping("/{id}") - // public DirectionsDto get(@PathVariable(name = "id") Long id) { - // return toDto(directionsService.get(id)); - // } + @GetMapping("/edit/{id}") + public String update( + @PathVariable(name = "id") Long id, + @RequestParam(name = PAGE_ATTRIBUTE, defaultValue = "0") int page, + Model model) { + if (id <= 0) { + throw new IllegalArgumentException(); + } + model.addAttribute(DIRECTIONS_ATTRIBUTE, toDto(directionsService.get(id))); + model.addAttribute(DEPARTMENT_ATTRIBUTE, getDepartments()); + model.addAttribute(PAGE_ATTRIBUTE, page); + return DIRECTIONS_EDIT_VIEW; + } - // @PostMapping - // public DirectionsDto create(@RequestBody @Valid DirectionsDto dto) { - // return toDto(directionsService.create(toEntity(dto))); - // } + @PostMapping("/edit/{id}") + public String update( + @PathVariable(name = "id") Long id, + @RequestParam(name = PAGE_ATTRIBUTE, defaultValue = "0") int page, + @ModelAttribute(name = DIRECTIONS_ATTRIBUTE) @Valid DirectionsDto direction, + BindingResult bindingResult, + Model model, + RedirectAttributes redirectAttributes) { + if (bindingResult.hasErrors()) { + return DIRECTIONS_EDIT_VIEW; + } + if (id <= 0) { + throw new IllegalArgumentException(); + } + redirectAttributes.addAttribute(PAGE_ATTRIBUTE, page); + directionsService.update(id, toEntity(direction)); + return Constants.REDIRECT_VIEW + URL; + } - // @PutMapping("/{id}") - // public DirectionsDto update(@PathVariable(name = "id") Long id, @RequestBody DirectionsDto dto) { - // return toDto(directionsService.update(id, toEntity(dto))); - // } - - // @DeleteMapping("/{id}") - // public DirectionsDto delete(@PathVariable(name = "id") Long id) { - // return toDto(directionsService.delete(id)); - // } + @PostMapping("/delete/{id}") + public String delete( + @PathVariable(name = "id") Long id, + @RequestParam(name = PAGE_ATTRIBUTE, defaultValue = "0") int page, + RedirectAttributes redirectAttributes) { + redirectAttributes.addAttribute(PAGE_ATTRIBUTE, page); + directionsService.delete(id); + return Constants.REDIRECT_VIEW + URL; + } } diff --git a/src/main/java/com/example/demo/news/api/NewsController.java b/src/main/java/com/example/demo/news/api/NewsController.java index 2b08ead..cb70726 100644 --- a/src/main/java/com/example/demo/news/api/NewsController.java +++ b/src/main/java/com/example/demo/news/api/NewsController.java @@ -63,6 +63,7 @@ public class NewsController { @GetMapping("/edit/") public String create(Model model) { model.addAttribute(NEWS_ATTRIBUTE, new NewsDto()); + model.addAttribute(DEPARTMENT_ATTRIBUTE, getDepartments()); return NEWS_EDIT_VIEW; } diff --git a/src/main/resources/templates/direction-edit.html b/src/main/resources/templates/direction-edit.html new file mode 100644 index 0000000..067dc70 --- /dev/null +++ b/src/main/resources/templates/direction-edit.html @@ -0,0 +1,53 @@ + + + + + Редактировать новость + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + Отмена +
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/directions.html b/src/main/resources/templates/directions.html index 547276b..899a486 100644 --- a/src/main/resources/templates/directions.html +++ b/src/main/resources/templates/directions.html @@ -18,13 +18,13 @@ - ID - Код - Направление - Кафедра - Предметы ЕГЭ - - + ID + Код + Направление + Кафедра + Предметы ЕГЭ + + @@ -37,17 +37,18 @@
- - - +
- - - +
diff --git a/src/main/resources/templates/new-edit.html b/src/main/resources/templates/new-edit.html index 362f8e6..75900f6 100644 --- a/src/main/resources/templates/new-edit.html +++ b/src/main/resources/templates/new-edit.html @@ -23,6 +23,12 @@
+
+ + +
+
+
-
+
+
diff --git a/src/main/resources/templates/news.html b/src/main/resources/templates/news.html index 838eeff..af3c2fa 100644 --- a/src/main/resources/templates/news.html +++ b/src/main/resources/templates/news.html @@ -20,6 +20,7 @@ ID + Дата публикации Заголовок Описание @@ -29,6 +30,7 @@ +