-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [fix] add multiple menus * [fix] change logic for add menus and update lowest price * [refac] change to storage logic bulk operation
- Loading branch information
Showing
8 changed files
with
65 additions
and
34 deletions.
There are no files selected for viewing
Submodule server-yml
updated
from 2002c8 to 763eb8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/main/java/org/hankki/hankkiserver/api/menu/service/command/MenuPostCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
package org.hankki.hankkiserver.api.menu.service.command; | ||
|
||
public record MenuPostCommand( | ||
long storeId, | ||
String name, | ||
int price | ||
) { | ||
public static MenuPostCommand of(final long storeId, final String name, final int price) { | ||
return new MenuPostCommand(storeId, name, price); | ||
public static MenuPostCommand of(final String name, final int price) { | ||
return new MenuPostCommand(name, price); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/org/hankki/hankkiserver/api/menu/service/command/MenusPostCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.hankki.hankkiserver.api.menu.service.command; | ||
|
||
import java.util.List; | ||
|
||
public record MenusPostCommand ( | ||
long storeId, | ||
List<MenuPostCommand> menu | ||
){ | ||
public static MenusPostCommand of (final long storeId, final List<MenuPostCommand> menu) { | ||
return new MenusPostCommand(storeId, menu); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/hankki/hankkiserver/api/menu/service/response/MenusPostResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.hankki.hankkiserver.api.menu.service.response; | ||
|
||
import org.hankki.hankkiserver.domain.menu.model.Menu; | ||
|
||
import java.util.List; | ||
|
||
public record MenusPostResponse( | ||
List<MenuPostResponse> menuList | ||
) { | ||
public static MenusPostResponse of(List<Menu> menus) { | ||
List<MenuPostResponse> menuResponses = menus.stream() | ||
.map(MenuPostResponse::of) | ||
.toList(); | ||
return new MenusPostResponse(menuResponses); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters