From 386203ef31afe8d22dbc434b75f3164fa64a748c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=AF=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=B2?= Date: Sun, 12 May 2024 14:27:43 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=B7=D0=B0=D0=BA=D0=B0=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- data.mv.db | Bin 65536 -> 49152 bytes .../demo/orders/service/OrderService.java | 8 ++-- .../demo/users/api/UserCartController.java | 25 +++++++----- src/main/resources/templates/game-edit.html | 36 ++++++++++++++++++ 5 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 src/main/resources/templates/game-edit.html diff --git a/build.gradle b/build.gradle index 233f023..e7d1be3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.2.4' + id 'org.springframework.boot' version '3.2.5' id 'io.spring.dependency-management' version '1.1.4' } diff --git a/data.mv.db b/data.mv.db index 75e080085b9d8d155574dbbca4b31c79404abce7..ef94f3ebadd0082f26a6811da9b03b48e58174b6 100644 GIT binary patch literal 49152 zcmeHQ>u(&_b)Q}Ck|WBJl{kJyPP|^rwiwgvdC#3~Vu+8WxDvUPmaA93sPmL*QCx*0 zZAl0cSxK8VEf63nTJ&p!rYH&&MS&J5+7Cuj6bOo1yBw)^ya}yykAfU2lh*H`clvq+qljZuxJ9n{_WzOwZNSNh$x! zIgoQ8=RnSZoC7%rat`Di$T^U6Am>2Nft&+52R?EREav+ENB#_Q0&))I9LPD4b0FtH z&Vif*IR|nMCxEPG5Jggg3ydf6cvF4|N5O*Xx$zPj7a+ zTXi+Gz%f8kR9`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}q!|3?O!#T&x^-(%BXh;YfH|JB_8Z61%+ z(bFivo*vk~62}v+v=ZNeDLqVuA@-<;{ateZXa4`sb;an{04%wucMmG{n5AB`vJGh)!_!QysrS&%&8bILwfXi{d0Y)P2A6OZ1v% zugNZk4tIa2_+?hU(}S{5lHT~|y8m18Bf}m@uZ22CrxBLX(HoE z6AAW5WPEEP<69FM-27`1hhyk-b)`hH^xVK-(;!ALK3t93CvhB=O*<7QtT+ZstKpl2Tg3PdnLJf6MpFTHVNdHsa><|XYKU*R>ppa* zNt)1dde`Z?Cp_$Nzm0zhB9$5A4|AcLYr7Lp-^UZ?3MLL=}J zPwpXf;T}e;vv#!udad z^NVo)k2d+;`qmJ?TYm!Q>D~Hs_|U%xzg)l8|517@?&Nn2;uzw)5;V18_W}M2_p5>C zN5o9*#L@i3iLmPsjp)7`L?qFOXPY`~cW49$dK?6vMtnj%E5?wCu^R=pCT$(Gz|<4Z zOhU+5iDSkDGEtbA794S6$2GB~1wn)pBlNW(CXqoxT?_5N4@1Y+LO0I+|8xI;uC&DO s&yPL#|9^jS%N=M{2U;=zPv_q?mCEQ(=l_w9y(n?)-I__)uG9Pf0Uk`-F8}}l diff --git a/src/main/java/com/example/demo/orders/service/OrderService.java b/src/main/java/com/example/demo/orders/service/OrderService.java index 210ec35..780152f 100644 --- a/src/main/java/com/example/demo/orders/service/OrderService.java +++ b/src/main/java/com/example/demo/orders/service/OrderService.java @@ -61,13 +61,13 @@ public class OrderService { } @Transactional - public List createAll(long userId, List entities) { - if (entities == null || entities.isEmpty()) { + public OrderEntity createAll(long userId, OrderEntity entitiy) { + if (entitiy == null) { throw new IllegalArgumentException("Orders list is null or empty"); } final UserEntity existsUser = userService.get(userId); - entities.forEach(entity -> entity.setUser(existsUser)); - return StreamSupport.stream(repository.saveAll(entities).spliterator(), false).toList(); + entitiy.setUser(existsUser); + return repository.save(entitiy); } @Transactional diff --git a/src/main/java/com/example/demo/users/api/UserCartController.java b/src/main/java/com/example/demo/users/api/UserCartController.java index 3be1044..5499f2a 100644 --- a/src/main/java/com/example/demo/users/api/UserCartController.java +++ b/src/main/java/com/example/demo/users/api/UserCartController.java @@ -67,18 +67,23 @@ public class UserCartController { return dto; } - private List toOrderEntities(Collection dtos) { + // private List toGameEntities(Collection dtos){ + // final GameEntity entity = modelMapper.map(dto, GameEntity.class); + // entity.setType(typeService.get(dto.getTypeId())); + // var genres = dto.getGenres(); + // List genresList = genreService.getAllById(genres); + // for (var genre : genresList) { + // entity.setGenres(genre); + // } + // return entity; + // } + + private OrderEntity toOrderEntities(Collection dtos) { final Set gameIds = dtos.stream() .map(UserCartDto::getGame) .collect(Collectors.toSet()); - final Map games = gameService.getByIds(gameIds).stream() - .collect(Collectors.toMap(GameEntity::getId, Function.identity())); - return dtos.stream() - .map(dto -> { - final OrderEntity entity = modelMapper.map(dto, OrderEntity.class); - entity.setGames(games.get(dto.getGame())); - return entity; - }).toList(); + final List games = gameService.getByIds(gameIds); + return new OrderEntity(games); } @GetMapping @@ -115,7 +120,7 @@ public class UserCartController { public String saveCart( Model model, @AuthenticationPrincipal UserPrincipal principal) { - orderService.createAll(principal.getId(), toOrderEntities(cart.values())); + orderService.create(principal.getId(), toOrderEntities(cart.values())); cart.clear(); return Constants.REDIRECT_VIEW + URL; } diff --git a/src/main/resources/templates/game-edit.html b/src/main/resources/templates/game-edit.html new file mode 100644 index 0000000..9c4353f --- /dev/null +++ b/src/main/resources/templates/game-edit.html @@ -0,0 +1,36 @@ + + + + + Редакторовать игру + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+
+
+
+ + + \ No newline at end of file