Skip to content

Commit

Permalink
hotfix: 쿠폰 메시지 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hongdosan committed Dec 2, 2023
1 parent cf650c4 commit 4e69376
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static Coupon toEntity(Long adminId, CreateCouponRequest coupon) {
public static CouponResponse toResponse(Coupon coupon) {
return CouponResponse.builder()
.id(coupon.getId())
.adminName("ID : " + coupon.getAdminId())
.adminId(coupon.getAdminId())
.name(coupon.getName())
.description(coupon.getDescription())
.point(coupon.getPoint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.moabam.admin.application.admin.AdminService;
import com.moabam.api.application.bug.BugService;
import com.moabam.api.domain.bug.BugType;
import com.moabam.api.domain.coupon.Coupon;
Expand Down Expand Up @@ -34,7 +35,9 @@ public class CouponService {

private final ClockHolder clockHolder;
private final BugService bugService;
private final AdminService adminService;
private final CouponManageService couponManageService;

private final CouponRepository couponRepository;
private final CouponSearchRepository couponSearchRepository;
private final CouponWalletRepository couponWalletRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class NotificationService {

private static final String COMMON_TITLE = "모아밤";
private static final String KNOCK_BODY = "[%s] - [%s]님이 콕콕콕!";
private static final String CERTIFY_TIME_BODY = "[%s] - 인증 시간!";
private static final String CERTIFY_TIME_BODY = "[%s] - 5분 후 인증 시간입니다!";

private final ClockHolder clockHolder;
private final FcmService fcmService;
Expand Down Expand Up @@ -62,7 +62,7 @@ public void sendCouponIssueResult(Long memberId, String couponName, String body)
fcmService.sendAsync(fcmToken, COMMON_TITLE, notificationBody);
}

@Scheduled(cron = "0 50 * * * *")
@Scheduled(cron = "0 55 * * * *")
public void sendCertificationTime() {
int certificationTime = (clockHolder.times().getHour() + ONE_HOUR) % HOURS_IN_A_DAY;
List<Participant> participants = participantSearchRepository.findAllByRoomCertifyTime(certificationTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@Builder
public record CouponResponse(
Long id,
String adminName,
Long adminId,
String name,
String description,
int point,
Expand Down
22 changes: 11 additions & 11 deletions src/main/resources/static/docs/coupon.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ <h4 id="_응답" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 201 Created
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Expand All @@ -506,7 +506,7 @@ <h4 id="_응답_2" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Expand Down Expand Up @@ -534,17 +534,17 @@ <h4 id="_응답_3" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Access-Control-Max-Age: 3600
Content-Type: application/json
Content-Length: 201
Content-Length: 192

{
"id" : 24,
"adminName" : "ID : 1",
"adminId" : 1,
"name" : "couponName",
"description" : "",
"point" : 10,
Expand Down Expand Up @@ -584,17 +584,17 @@ <h4 id="_응답_4" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Access-Control-Max-Age: 3600
Content-Type: application/json
Content-Length: 202
Content-Length: 193

[ {
"id" : 25,
"adminName" : "ID : 1",
"adminId" : 1,
"name" : "coupon1",
"description" : "",
"point" : 10,
Expand Down Expand Up @@ -631,7 +631,7 @@ <h4 id="_응답_5" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 409 Conflict
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Expand Down Expand Up @@ -666,7 +666,7 @@ <h4 id="_응답_6" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Expand Down Expand Up @@ -700,7 +700,7 @@ <h4 id="_응답_7" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/static/docs/notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ <h4 id="_응답" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Expand Down Expand Up @@ -499,7 +499,7 @@ <h4 id="_응답_2" class="discrete">응답</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Access-Control-Allow-Origin:
Access-Control-Allow-Origin: http://localhost:8080
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Access-Control-Allow-Headers: Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers, X-Requested-With,Content-Type, Referer
Access-Control-Allow-Credentials: true
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/moabam/support/snippet/CouponSnippet.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class CouponSnippet {

public static final ResponseFieldsSnippet COUPON_RESPONSE = responseFields(
fieldWithPath("id").type(NUMBER).description("쿠폰 ID"),
fieldWithPath("adminName").type(STRING).description("쿠폰 관리자명"),
fieldWithPath("adminId").type(NUMBER).description("쿠폰 관리자 ID"),
fieldWithPath("name").type(STRING).description("쿠폰명"),
fieldWithPath("description").type(STRING).description("쿠폰에 대한 간단 소개 (NULL 가능)"),
fieldWithPath("point").type(NUMBER).description("쿠폰 사용 시, 제공하는 포인트량"),
Expand All @@ -38,7 +38,7 @@ public final class CouponSnippet {

public static final ResponseFieldsSnippet COUPON_STATUS_RESPONSE = responseFields(
fieldWithPath("[].id").type(NUMBER).description("쿠폰 ID"),
fieldWithPath("[].adminName").type(STRING).description("쿠폰 관리자명"),
fieldWithPath("[].adminId").type(NUMBER).description("쿠폰 관리자 ID"),
fieldWithPath("[].name").type(STRING).description("쿠폰명"),
fieldWithPath("[].description").type(STRING).description("쿠폰에 대한 간단 소개 (NULL 가능)"),
fieldWithPath("[].point").type(NUMBER).description("쿠폰 사용 시, 제공하는 포인트량"),
Expand Down

0 comments on commit 4e69376

Please sign in to comment.