From 1d22e66271042f1a65f748ae07a0aa041c4702ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Wed, 30 Oct 2024 23:11:37 +0900 Subject: [PATCH 1/6] =?UTF-8?q?[GTB-97]=20fix:=20=EA=B0=95=EC=A0=9C=20?= =?UTF-8?q?=EC=B7=A8=EC=86=8C=20=EC=8B=9C=EA=B0=84=205->7=EB=B6=84?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gachontablebe/domain/admin/usecase/CallUser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/CallUser.java b/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/CallUser.java index 21fd09b..1f9c262 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/CallUser.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/CallUser.java @@ -58,7 +58,7 @@ public String execute(AuthDetails authDetails, CallUserRequest request, String l private void scheduleAutoCancel(UUID waitingId, HashMap variables) { executorService.schedule(() -> - autoCancelUser.execute(waitingId, variables, "자동 취소"), 5, TimeUnit.MINUTES); + autoCancelUser.execute(waitingId, variables, "자동 취소"), 7, TimeUnit.MINUTES); } private void checkPubMatches(AuthDetails authDetails, Pub pub) { From 5732d09cf924b47c21eda48a8bb4dcc016f5294b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Wed, 30 Oct 2024 23:13:09 +0900 Subject: [PATCH 2/6] =?UTF-8?q?[GTB-97]=20fix:=20=EC=B5=9C=EB=8C=80=20?= =?UTF-8?q?=EC=9B=A8=EC=9D=B4=ED=8C=85=20=EC=A0=9C=ED=95=9C=2030->50=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../site/gachontable/gachontablebe/domain/pub/domain/Pub.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java index 6ae20ac..3394439 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java @@ -10,7 +10,7 @@ @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Pub { - private static final Integer MAX_WAITING_COUNT = 30; + private static final Integer MAX_WAITING_COUNT = 50; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) From de2f3e2924bb317f8f5316bb51a2885520ee2a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Wed, 30 Oct 2024 23:15:36 +0900 Subject: [PATCH 3/6] =?UTF-8?q?[GTB-97]=20fix:=20=EB=8C=80=EA=B8=B0=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=B3=80=EA=B2=BD=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=B5=9C=EB=8C=80=20=EC=9B=A8=EC=9D=B4?= =?UTF-8?q?=ED=8C=85=20=EC=A0=9C=ED=95=9C=20=EC=9D=B4=ED=95=98=EC=9D=BC=20?= =?UTF-8?q?=EB=95=8C=20=EC=83=81=ED=83=9C=EA=B0=80=20true=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EB=90=98=EB=8A=94=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gachontablebe/domain/pub/domain/Pub.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java index 3394439..b16553a 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java @@ -40,6 +40,9 @@ public class Pub { @Column(nullable = false) private Integer waitingCount; + @Column(nullable = false) + private Boolean autoDisabled; + public static Pub create(String pubName, String oneLiner, String instagramUrl, @@ -87,15 +90,20 @@ public void increaseWaitingCount() { private void checkMaxWaitingCount() { if (this.waitingCount >= MAX_WAITING_COUNT) { this.waitingStatus = false; - return; + this.autoDisabled = true; } - this.waitingStatus = true; } public void decreaseWaitingCount() { validateWaitingCount(); + validateCanUpdateWaitingStatusToTrue(); this.waitingCount -= 1; - checkMaxWaitingCount(); + } + + private void validateCanUpdateWaitingStatusToTrue() { + if (this.autoDisabled && !this.waitingStatus && this.waitingCount < MAX_WAITING_COUNT) { + this.waitingStatus = true; + } } private void validateWaitingCount() { @@ -112,6 +120,7 @@ public void updateOpenStatus(Boolean openStatus) { public void updateWaitingStatus(Boolean waitingStatus) { this.waitingStatus = waitingStatus; + this.autoDisabled = false; } public void checkStatus() { From 11a5b89e997168103d36b20dc0d3173da85321fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Wed, 30 Oct 2024 23:46:54 +0900 Subject: [PATCH 4/6] =?UTF-8?q?[GTB-97]=20fix:=20waitingCount=20=EB=B9=84?= =?UTF-8?q?=EA=B5=90=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../site/gachontable/gachontablebe/domain/pub/domain/Pub.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java index b16553a..319f757 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java @@ -101,7 +101,7 @@ public void decreaseWaitingCount() { } private void validateCanUpdateWaitingStatusToTrue() { - if (this.autoDisabled && !this.waitingStatus && this.waitingCount < MAX_WAITING_COUNT) { + if (this.autoDisabled && !this.waitingStatus && this.waitingCount <= MAX_WAITING_COUNT) { this.waitingStatus = true; } } From 2efd3a44b7177c424cf2273ec502250c9f95e642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Thu, 31 Oct 2024 00:13:07 +0900 Subject: [PATCH 5/6] =?UTF-8?q?[GTB-97]=20fix:=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EC=9D=B4=EC=9A=A9=20=EC=8B=9C=EA=B0=84=20=EB=8B=A8?= =?UTF-8?q?=EC=9C=84=20=EB=B3=80=EA=B2=BD=20hours=20->=20minutes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gachontablebe/domain/admin/usecase/EnterUser.java | 2 +- .../gachontablebe/domain/pub/domain/Pub.java | 10 +++++----- .../presentation/dto/request/PubRegisterRequest.java | 2 +- .../gachontablebe/domain/pub/usecase/PubService.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/EnterUser.java b/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/EnterUser.java index 7ab4a82..648b594 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/EnterUser.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/admin/usecase/EnterUser.java @@ -61,7 +61,7 @@ private void createSeating(Pub pub, Waiting waiting, Integer seatingNum) { Seating seating = Seating.create( seatingNum, waiting.getTableType(), - LocalDateTime.now().plusHours(pub.getHours()), + LocalDateTime.now().plusMinutes(pub.getMinutes()), pub, waiting, waiting.getUser()); diff --git a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java index 319f757..848eeab 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/pub/domain/Pub.java @@ -26,7 +26,7 @@ public class Pub { private String instagramUrl; @Column(nullable = false) - private Integer hours; + private Integer minutes; @Column(nullable = false) private String menuUrl; @@ -46,7 +46,7 @@ public class Pub { public static Pub create(String pubName, String oneLiner, String instagramUrl, - Integer hours, + Integer minutes, String menuUrl, Boolean openStatus, Boolean waitingStatus, @@ -55,7 +55,7 @@ public static Pub create(String pubName, .pubName(pubName) .oneLiner(oneLiner) .instagramUrl(instagramUrl) - .hours(hours) + .minutes(minutes) .menuUrl(menuUrl) .openStatus(openStatus) .waitingStatus(waitingStatus) @@ -67,7 +67,7 @@ public static Pub create(String pubName, private Pub(String pubName, String oneLiner, String instagramUrl, - Integer hours, + Integer minutes, String menuUrl, Boolean openStatus, Boolean waitingStatus, @@ -75,7 +75,7 @@ private Pub(String pubName, this.pubName = pubName; this.oneLiner = oneLiner; this.instagramUrl = instagramUrl; - this.hours = hours; + this.minutes = minutes; this.menuUrl = menuUrl; this.openStatus = openStatus; this.waitingStatus = waitingStatus; diff --git a/src/main/java/site/gachontable/gachontablebe/domain/pub/presentation/dto/request/PubRegisterRequest.java b/src/main/java/site/gachontable/gachontablebe/domain/pub/presentation/dto/request/PubRegisterRequest.java index 254ef83..e35668a 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/pub/presentation/dto/request/PubRegisterRequest.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/pub/presentation/dto/request/PubRegisterRequest.java @@ -3,7 +3,7 @@ public record PubRegisterRequest(String pubName, String oneLiner, String instagramUrl, - Integer hours, + Integer minutes, String menuUrl, Boolean openStatus, Boolean waitingStatus) { diff --git a/src/main/java/site/gachontable/gachontablebe/domain/pub/usecase/PubService.java b/src/main/java/site/gachontable/gachontablebe/domain/pub/usecase/PubService.java index 719e583..3fd5ca3 100644 --- a/src/main/java/site/gachontable/gachontablebe/domain/pub/usecase/PubService.java +++ b/src/main/java/site/gachontable/gachontablebe/domain/pub/usecase/PubService.java @@ -59,7 +59,7 @@ public Pub createPub(PubRegisterRequest request) { return Pub.create(request.pubName(), request.oneLiner(), request.instagramUrl(), - request.hours(), + request.minutes(), request.menuUrl(), request.openStatus(), request.waitingStatus(), From 98bffb95a374f85b0cada6a5e03e7a87f0bbe650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Thu, 31 Oct 2024 13:29:59 +0900 Subject: [PATCH 6/6] =?UTF-8?q?HOTFIX:=20=ED=8F=AC=ED=8A=B8=20=EB=AA=85?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yaml | 3 +++ src/main/resources/application-prod.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/resources/application-dev.yaml b/src/main/resources/application-dev.yaml index 0622792..e59b9c3 100644 --- a/src/main/resources/application-dev.yaml +++ b/src/main/resources/application-dev.yaml @@ -1,3 +1,6 @@ +server: + port: 8080 + spring: datasource: master: diff --git a/src/main/resources/application-prod.yaml b/src/main/resources/application-prod.yaml index df79548..83e2eb9 100644 --- a/src/main/resources/application-prod.yaml +++ b/src/main/resources/application-prod.yaml @@ -1,3 +1,6 @@ +server: + port: 8080 + spring: datasource: master: