diff --git a/src/main/java/com/moabam/api/application/coupon/CouponMapper.java b/src/main/java/com/moabam/api/application/coupon/CouponMapper.java index a04f298e..f61a6c3c 100644 --- a/src/main/java/com/moabam/api/application/coupon/CouponMapper.java +++ b/src/main/java/com/moabam/api/application/coupon/CouponMapper.java @@ -11,15 +11,15 @@ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class CouponMapper { - public static Coupon toEntity(Long adminId, CreateCouponRequest request) { + public static Coupon toEntity(Long adminId, CreateCouponRequest coupon) { return Coupon.builder() - .name(request.name()) - .description(request.description()) - .type(CouponType.from(request.couponType())) - .point(request.point()) - .stock(request.stock()) - .startAt(request.startAt()) - .endAt(request.endAt()) + .name(coupon.name()) + .description(coupon.description()) + .type(CouponType.from(coupon.type())) + .point(coupon.point()) + .stock(coupon.stock()) + .startAt(coupon.startAt()) + .endAt(coupon.endAt()) .adminId(adminId) .build(); } @@ -27,13 +27,13 @@ public static Coupon toEntity(Long adminId, CreateCouponRequest request) { // TODO : Admin Table 생성 시, 관리자 명 추가할 예정 public static CouponResponse toDto(Coupon coupon) { return CouponResponse.builder() - .couponId(coupon.getId()) - .couponAdminName(coupon.getAdminId() + "admin") + .id(coupon.getId()) + .adminName(coupon.getAdminId() + "admin") .name(coupon.getName()) .description(coupon.getDescription()) .point(coupon.getPoint()) .stock(coupon.getStock()) - .couponType(coupon.getType()) + .type(coupon.getType()) .startAt(coupon.getStartAt()) .endAt(coupon.getEndAt()) .build(); diff --git a/src/main/java/com/moabam/api/application/coupon/CouponQueueService.java b/src/main/java/com/moabam/api/application/coupon/CouponQueueService.java index 5da33e6a..4bc3a165 100644 --- a/src/main/java/com/moabam/api/application/coupon/CouponQueueService.java +++ b/src/main/java/com/moabam/api/application/coupon/CouponQueueService.java @@ -25,12 +25,12 @@ public void register(AuthorizationMember member, String couponName) { return; } - couponQueueRepository.addQueue(couponName, member.nickname(), registerTime); + couponQueueRepository.addIfAbsent(couponName, member.nickname(), registerTime); } private boolean canRegister(String couponName) { - Coupon coupon = couponService.validateCouponPeriod(couponName); + Coupon coupon = couponService.validatePeriod(couponName); - return coupon.getStock() <= couponQueueRepository.queueSize(coupon.getName()); + return coupon.getStock() <= couponQueueRepository.size(coupon.getName()); } } diff --git a/src/main/java/com/moabam/api/application/coupon/CouponService.java b/src/main/java/com/moabam/api/application/coupon/CouponService.java index f967c096..5bf73a70 100644 --- a/src/main/java/com/moabam/api/application/coupon/CouponService.java +++ b/src/main/java/com/moabam/api/application/coupon/CouponService.java @@ -11,7 +11,7 @@ import com.moabam.api.domain.coupon.repository.CouponSearchRepository; import com.moabam.api.domain.member.Role; import com.moabam.api.dto.coupon.CouponResponse; -import com.moabam.api.dto.coupon.CouponSearchRequest; +import com.moabam.api.dto.coupon.CouponStatusRequest; import com.moabam.api.dto.coupon.CreateCouponRequest; import com.moabam.global.auth.model.AuthorizationMember; import com.moabam.global.common.util.ClockHolder; @@ -32,31 +32,31 @@ public class CouponService { private final ClockHolder clockHolder; @Transactional - public void createCoupon(AuthorizationMember admin, CreateCouponRequest request) { + public void create(AuthorizationMember admin, CreateCouponRequest request) { validateAdminRole(admin); - validateConflictCouponName(request.name()); - validateCouponPeriod(request.startAt(), request.endAt()); + validateConflictName(request.name()); + validatePeriod(request.startAt(), request.endAt()); Coupon coupon = CouponMapper.toEntity(admin.id(), request); couponRepository.save(coupon); } @Transactional - public void deleteCoupon(AuthorizationMember admin, Long couponId) { + public void delete(AuthorizationMember admin, Long couponId) { validateAdminRole(admin); Coupon coupon = couponRepository.findById(couponId) .orElseThrow(() -> new NotFoundException(ErrorMessage.NOT_FOUND_COUPON)); couponRepository.delete(coupon); } - public CouponResponse getCouponById(Long couponId) { + public CouponResponse getById(Long couponId) { Coupon coupon = couponRepository.findById(couponId) .orElseThrow(() -> new NotFoundException(ErrorMessage.NOT_FOUND_COUPON)); return CouponMapper.toDto(coupon); } - public List getCoupons(CouponSearchRequest request) { + public List getAllByStatus(CouponStatusRequest request) { LocalDateTime now = clockHolder.times(); List coupons = couponSearchRepository.findAllByStatus(now, request); @@ -65,7 +65,7 @@ public List getCoupons(CouponSearchRequest request) { .toList(); } - public Coupon validateCouponPeriod(String couponName) { + public Coupon validatePeriod(String couponName) { LocalDateTime now = clockHolder.times(); Coupon coupon = couponRepository.findByName(couponName) .orElseThrow(() -> new NotFoundException(ErrorMessage.NOT_FOUND_COUPON)); @@ -77,7 +77,7 @@ public Coupon validateCouponPeriod(String couponName) { throw new BadRequestException(ErrorMessage.INVALID_COUPON_PERIOD_END); } - private void validateCouponPeriod(LocalDateTime startAt, LocalDateTime endAt) { + private void validatePeriod(LocalDateTime startAt, LocalDateTime endAt) { if (startAt.isAfter(endAt)) { throw new BadRequestException(ErrorMessage.INVALID_COUPON_PERIOD); } @@ -89,8 +89,8 @@ private void validateAdminRole(AuthorizationMember admin) { } } - private void validateConflictCouponName(String name) { - if (couponRepository.existsByName(name)) { + private void validateConflictName(String couponName) { + if (couponRepository.existsByName(couponName)) { throw new ConflictException(ErrorMessage.CONFLICT_COUPON_NAME); } } diff --git a/src/main/java/com/moabam/api/application/notification/NotificationService.java b/src/main/java/com/moabam/api/application/notification/NotificationService.java index 0f7f30d8..a8f891ab 100644 --- a/src/main/java/com/moabam/api/application/notification/NotificationService.java +++ b/src/main/java/com/moabam/api/application/notification/NotificationService.java @@ -40,21 +40,21 @@ public class NotificationService { private final ClockHolder clockHolder; @Transactional - public void sendKnockNotification(AuthorizationMember member, Long targetId, Long roomId) { + public void sendKnock(AuthorizationMember member, Long targetId, Long roomId) { roomService.validateRoomById(roomId); String knockKey = generateKnockKey(member.id(), targetId, roomId); - validateConflictKnockNotification(knockKey); + validateConflictKnock(knockKey); validateFcmToken(targetId); String fcmToken = notificationRepository.findFcmTokenByMemberId(targetId); String notificationBody = String.format(KNOCK_BODY, member.nickname()); - fcmService.sendAsyncFcm(fcmToken, notificationBody); - notificationRepository.saveKnockNotification(knockKey); + fcmService.sendAsync(fcmToken, notificationBody); + notificationRepository.saveKnock(knockKey); } @Scheduled(cron = "0 50 * * * *") - public void sendCertificationTimeNotification() { + public void sendCertificationTime() { int certificationTime = (clockHolder.times().getHour() + ONE_HOUR) % HOURS_IN_A_DAY; List participants = participantSearchRepository.findAllByRoomCertifyTime(certificationTime); @@ -62,28 +62,27 @@ public void sendCertificationTimeNotification() { String roomTitle = participant.getRoom().getTitle(); String fcmToken = notificationRepository.findFcmTokenByMemberId(participant.getMemberId()); String notificationBody = String.format(CERTIFY_TIME_BODY, roomTitle); - fcmService.sendAsyncFcm(fcmToken, notificationBody); + fcmService.sendAsync(fcmToken, notificationBody); }); } - public List getMyKnockedNotificationStatusInRoom(Long memberId, Long roomId, - List participants) { + public List getMyKnockStatusInRoom(Long memberId, Long roomId, List participants) { List filteredParticipants = participants.stream() .filter(participant -> !participant.getMemberId().equals(memberId)) .toList(); Predicate knockPredicate = targetId -> - notificationRepository.existsByKey(generateKnockKey(memberId, targetId, roomId)); + notificationRepository.existsKnockByKnockKey(generateKnockKey(memberId, targetId, roomId)); - Map> knockNotificationStatus = filteredParticipants.stream() + Map> knockStatus = filteredParticipants.stream() .map(Participant::getMemberId) .collect(Collectors.partitioningBy(knockPredicate)); - return knockNotificationStatus.get(true); + return knockStatus.get(true); } - private void validateConflictKnockNotification(String knockKey) { - if (notificationRepository.existsByKey(knockKey)) { + private void validateConflictKnock(String knockKey) { + if (notificationRepository.existsKnockByKnockKey(knockKey)) { throw new ConflictException(ErrorMessage.CONFLICT_KNOCK); } } diff --git a/src/main/java/com/moabam/api/application/room/RoomSearchService.java b/src/main/java/com/moabam/api/application/room/RoomSearchService.java index 912eea8f..778ea11f 100644 --- a/src/main/java/com/moabam/api/application/room/RoomSearchService.java +++ b/src/main/java/com/moabam/api/application/room/RoomSearchService.java @@ -190,7 +190,7 @@ private List getTodayCertificateRankResponses(Long .map(Participant::getMemberId) .toList()); - List myKnockedNotificationStatusInRoom = notificationService.getMyKnockedNotificationStatusInRoom( + List myKnockedNotificationStatusInRoom = notificationService.getMyKnockStatusInRoom( memberId, roomId, participants); addCompletedMembers(responses, dailyMemberCertifications, members, certifications, participants, date, diff --git a/src/main/java/com/moabam/api/domain/coupon/CouponType.java b/src/main/java/com/moabam/api/domain/coupon/CouponType.java index f8bfa263..722d4e8a 100644 --- a/src/main/java/com/moabam/api/domain/coupon/CouponType.java +++ b/src/main/java/com/moabam/api/domain/coupon/CouponType.java @@ -23,16 +23,16 @@ public enum CouponType { GOLDEN_COUPON("황금"), DISCOUNT_COUPON("할인"); - private final String typeName; + private final String name; private static final Map COUPON_TYPE_MAP; static { COUPON_TYPE_MAP = Collections.unmodifiableMap(Arrays.stream(values()) - .collect(Collectors.toMap(CouponType::getTypeName, Function.identity()))); + .collect(Collectors.toMap(CouponType::getName, Function.identity()))); } - public static CouponType from(String typeName) { - return Optional.ofNullable(COUPON_TYPE_MAP.get(typeName)) + public static CouponType from(String name) { + return Optional.ofNullable(COUPON_TYPE_MAP.get(name)) .orElseThrow(() -> new NotFoundException(ErrorMessage.NOT_FOUND_COUPON_TYPE)); } } diff --git a/src/main/java/com/moabam/api/domain/coupon/repository/CouponQueueRepository.java b/src/main/java/com/moabam/api/domain/coupon/repository/CouponQueueRepository.java index 6c82e022..a7ab35ef 100644 --- a/src/main/java/com/moabam/api/domain/coupon/repository/CouponQueueRepository.java +++ b/src/main/java/com/moabam/api/domain/coupon/repository/CouponQueueRepository.java @@ -14,11 +14,11 @@ public class CouponQueueRepository { private final ZSetRedisRepository zSetRedisRepository; - public void addQueue(String couponName, String memberNickname, double score) { + public void addIfAbsent(String couponName, String memberNickname, double score) { zSetRedisRepository.addIfAbsent(requireNonNull(couponName), requireNonNull(memberNickname), score); } - public Long queueSize(String couponName) { + public Long size(String couponName) { return zSetRedisRepository.size(requireNonNull(couponName)); } } diff --git a/src/main/java/com/moabam/api/domain/coupon/repository/CouponSearchRepository.java b/src/main/java/com/moabam/api/domain/coupon/repository/CouponSearchRepository.java index 7bbc3889..7a922d2a 100644 --- a/src/main/java/com/moabam/api/domain/coupon/repository/CouponSearchRepository.java +++ b/src/main/java/com/moabam/api/domain/coupon/repository/CouponSearchRepository.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository; import com.moabam.api.domain.coupon.Coupon; -import com.moabam.api.dto.coupon.CouponSearchRequest; +import com.moabam.api.dto.coupon.CouponStatusRequest; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.core.types.dsl.Expressions; import com.querydsl.jpa.impl.JPAQueryFactory; @@ -21,48 +21,48 @@ public class CouponSearchRepository { private final JPAQueryFactory jpaQueryFactory; - public List findAllByStatus(LocalDateTime now, CouponSearchRequest request) { + public List findAllByStatus(LocalDateTime now, CouponStatusRequest couponStatus) { return jpaQueryFactory.selectFrom(coupon) - .where(filterCouponStatus(now, request)) + .where(filterStatus(now, couponStatus)) .fetch(); } - private BooleanExpression filterCouponStatus(LocalDateTime now, CouponSearchRequest request) { - if (request.couponOngoing() && request.couponNotStarted() && request.couponEnded()) { + private BooleanExpression filterStatus(LocalDateTime now, CouponStatusRequest couponStatus) { + if (couponStatus.ongoing() && couponStatus.notStarted() && couponStatus.ended()) { return null; } // 시작 전이거나 진행 중인 쿠폰들을 조회하고 싶은 경우 - if (request.couponOngoing() && request.couponNotStarted()) { + if (couponStatus.ongoing() && couponStatus.notStarted()) { return (coupon.startAt.gt(now)) .or(coupon.startAt.loe(now).and(coupon.endAt.goe(now))); } // 종료 됐거나 진행 중인 쿠폰들을 조회하고 싶은 경우 - if (request.couponOngoing() && request.couponEnded()) { + if (couponStatus.ongoing() && couponStatus.ended()) { return (coupon.endAt.lt(now)) .or(coupon.startAt.loe(now).and(coupon.endAt.goe(now))); } // 진행 중이 아니고, 시작 전이거나, 종료된 쿠폰들을 조회하고 싶은 경우 - if (request.couponNotStarted() && request.couponEnded()) { + if (couponStatus.notStarted() && couponStatus.ended()) { return coupon.startAt.gt(now) .or(coupon.endAt.lt(now)); } // 진행 중인 쿠폰들을 조회하고 싶은 경우 - if (request.couponOngoing()) { + if (couponStatus.ongoing()) { return coupon.startAt.loe(now) .and(coupon.endAt.goe(now)); } // 시작 적인 쿠폰들을 조회하고 싶은 경우 - if (request.couponNotStarted()) { + if (couponStatus.notStarted()) { return coupon.startAt.gt(now); } // 종료된 쿠폰들을 조회하고 싶은 경우 - if (request.couponEnded()) { + if (couponStatus.ended()) { return coupon.endAt.lt(now); } diff --git a/src/main/java/com/moabam/api/domain/notification/repository/NotificationRepository.java b/src/main/java/com/moabam/api/domain/notification/repository/NotificationRepository.java index df41d185..2701d9d8 100644 --- a/src/main/java/com/moabam/api/domain/notification/repository/NotificationRepository.java +++ b/src/main/java/com/moabam/api/domain/notification/repository/NotificationRepository.java @@ -29,7 +29,7 @@ public void saveFcmToken(Long memberId, String fcmToken) { ); } - public void saveKnockNotification(String knockKey) { + public void saveKnock(String knockKey) { stringRedisRepository.save( requireNonNull(knockKey), BLANK, @@ -46,8 +46,8 @@ public String findFcmTokenByMemberId(Long memberId) { return stringRedisRepository.get(String.valueOf(requireNonNull(memberId))); } - public boolean existsByKey(String key) { - return stringRedisRepository.hasKey(requireNonNull(key)); + public boolean existsKnockByKnockKey(String knockKey) { + return stringRedisRepository.hasKey(requireNonNull(knockKey)); } public boolean existsFcmTokenByMemberId(Long memberId) { diff --git a/src/main/java/com/moabam/api/dto/coupon/CouponResponse.java b/src/main/java/com/moabam/api/dto/coupon/CouponResponse.java index 3be5e025..0a323acd 100644 --- a/src/main/java/com/moabam/api/dto/coupon/CouponResponse.java +++ b/src/main/java/com/moabam/api/dto/coupon/CouponResponse.java @@ -9,13 +9,13 @@ @Builder public record CouponResponse( - Long couponId, - String couponAdminName, + Long id, + String adminName, String name, String description, int point, int stock, - CouponType couponType, + CouponType type, @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm") LocalDateTime startAt, @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm") diff --git a/src/main/java/com/moabam/api/dto/coupon/CouponSearchRequest.java b/src/main/java/com/moabam/api/dto/coupon/CouponSearchRequest.java deleted file mode 100644 index 8e8e1c2d..00000000 --- a/src/main/java/com/moabam/api/dto/coupon/CouponSearchRequest.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.moabam.api.dto.coupon; - -import lombok.Builder; - -@Builder -public record CouponSearchRequest( - boolean couponOngoing, - boolean couponNotStarted, - boolean couponEnded -) { - -} diff --git a/src/main/java/com/moabam/api/dto/coupon/CouponStatusRequest.java b/src/main/java/com/moabam/api/dto/coupon/CouponStatusRequest.java new file mode 100644 index 00000000..0c41fcdb --- /dev/null +++ b/src/main/java/com/moabam/api/dto/coupon/CouponStatusRequest.java @@ -0,0 +1,12 @@ +package com.moabam.api.dto.coupon; + +import lombok.Builder; + +@Builder +public record CouponStatusRequest( + boolean ongoing, + boolean notStarted, + boolean ended +) { + +} diff --git a/src/main/java/com/moabam/api/dto/coupon/CreateCouponRequest.java b/src/main/java/com/moabam/api/dto/coupon/CreateCouponRequest.java index ade47498..245ff76e 100644 --- a/src/main/java/com/moabam/api/dto/coupon/CreateCouponRequest.java +++ b/src/main/java/com/moabam/api/dto/coupon/CreateCouponRequest.java @@ -15,7 +15,7 @@ public record CreateCouponRequest( @NotBlank(message = "쿠폰명이 입력되지 않았거나 20자를 넘었습니다.") @Length(max = 20) String name, @Length(max = 50, message = "쿠폰 간단 소개는 최대 50자까지 가능합니다.") String description, - @NotBlank(message = "쿠폰 종류를 입력해주세요.") String couponType, + @NotBlank(message = "쿠폰 종류를 입력해주세요.") String type, @Min(value = 1, message = "벌레 수 혹은 할인 금액은 1 이상이어야 합니다.") int point, @Min(value = 1, message = "쿠폰 재고는 1 이상이어야 합니다.") int stock, @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm") diff --git a/src/main/java/com/moabam/api/application/notification/NotificationMapper.java b/src/main/java/com/moabam/api/infrastructure/fcm/FcmMapper.java similarity index 75% rename from src/main/java/com/moabam/api/application/notification/NotificationMapper.java rename to src/main/java/com/moabam/api/infrastructure/fcm/FcmMapper.java index 57e027c1..f977fc84 100644 --- a/src/main/java/com/moabam/api/application/notification/NotificationMapper.java +++ b/src/main/java/com/moabam/api/infrastructure/fcm/FcmMapper.java @@ -1,4 +1,4 @@ -package com.moabam.api.application.notification; +package com.moabam.api.infrastructure.fcm; import com.google.firebase.messaging.Message; import com.google.firebase.messaging.Notification; @@ -7,7 +7,7 @@ import lombok.NoArgsConstructor; @NoArgsConstructor(access = AccessLevel.PRIVATE) -public final class NotificationMapper { +public final class FcmMapper { private static final String NOTIFICATION_TITLE = "모아밤"; @@ -18,7 +18,7 @@ public static Notification toNotification(String body) { .build(); } - public static Message toMessageEntity(Notification notification, String fcmToken) { + public static Message toMessage(Notification notification, String fcmToken) { return Message.builder() .setNotification(notification) .setToken(fcmToken) diff --git a/src/main/java/com/moabam/api/infrastructure/fcm/FcmService.java b/src/main/java/com/moabam/api/infrastructure/fcm/FcmService.java index e995688c..357be42d 100644 --- a/src/main/java/com/moabam/api/infrastructure/fcm/FcmService.java +++ b/src/main/java/com/moabam/api/infrastructure/fcm/FcmService.java @@ -5,7 +5,6 @@ import com.google.firebase.messaging.FirebaseMessaging; import com.google.firebase.messaging.Message; import com.google.firebase.messaging.Notification; -import com.moabam.api.application.notification.NotificationMapper; import lombok.RequiredArgsConstructor; @@ -15,11 +14,11 @@ public class FcmService { private final FirebaseMessaging firebaseMessaging; - public void sendAsyncFcm(String fcmToken, String notificationBody) { - Notification notification = NotificationMapper.toNotification(notificationBody); + public void sendAsync(String fcmToken, String notificationBody) { + Notification notification = FcmMapper.toNotification(notificationBody); if (fcmToken != null) { - Message message = NotificationMapper.toMessageEntity(notification, fcmToken); + Message message = FcmMapper.toMessage(notification, fcmToken); firebaseMessaging.sendAsync(message); } } diff --git a/src/main/java/com/moabam/api/presentation/CouponController.java b/src/main/java/com/moabam/api/presentation/CouponController.java index a1aa4664..f37259e4 100644 --- a/src/main/java/com/moabam/api/presentation/CouponController.java +++ b/src/main/java/com/moabam/api/presentation/CouponController.java @@ -15,7 +15,7 @@ import com.moabam.api.application.coupon.CouponQueueService; import com.moabam.api.application.coupon.CouponService; import com.moabam.api.dto.coupon.CouponResponse; -import com.moabam.api.dto.coupon.CouponSearchRequest; +import com.moabam.api.dto.coupon.CouponStatusRequest; import com.moabam.api.dto.coupon.CreateCouponRequest; import com.moabam.global.auth.annotation.CurrentMember; import com.moabam.global.auth.model.AuthorizationMember; @@ -32,27 +32,27 @@ public class CouponController { @PostMapping("/admins/coupons") @ResponseStatus(HttpStatus.CREATED) - public void createCoupon(@CurrentMember AuthorizationMember admin, + public void create(@CurrentMember AuthorizationMember admin, @Valid @RequestBody CreateCouponRequest request) { - couponService.createCoupon(admin, request); + couponService.create(admin, request); } @DeleteMapping("/admins/coupons/{couponId}") @ResponseStatus(HttpStatus.OK) - public void deleteCoupon(@CurrentMember AuthorizationMember admin, @PathVariable("couponId") Long couponId) { - couponService.deleteCoupon(admin, couponId); + public void delete(@CurrentMember AuthorizationMember admin, @PathVariable("couponId") Long couponId) { + couponService.delete(admin, couponId); } @GetMapping("/coupons/{couponId}") @ResponseStatus(HttpStatus.OK) - public CouponResponse getCouponById(@PathVariable("couponId") Long couponId) { - return couponService.getCouponById(couponId); + public CouponResponse getById(@PathVariable("couponId") Long couponId) { + return couponService.getById(couponId); } @PostMapping("/coupons/search") @ResponseStatus(HttpStatus.OK) - public List getCoupons(@Valid @RequestBody CouponSearchRequest request) { - return couponService.getCoupons(request); + public List getAllByStatus(@Valid @RequestBody CouponStatusRequest request) { + return couponService.getAllByStatus(request); } @PostMapping("/coupons") diff --git a/src/main/java/com/moabam/api/presentation/NotificationController.java b/src/main/java/com/moabam/api/presentation/NotificationController.java index 7ddb34f1..f83d74aa 100644 --- a/src/main/java/com/moabam/api/presentation/NotificationController.java +++ b/src/main/java/com/moabam/api/presentation/NotificationController.java @@ -21,6 +21,6 @@ public class NotificationController { @GetMapping("/rooms/{roomId}/members/{memberId}") public void sendKnockNotification(@CurrentMember AuthorizationMember member, @PathVariable("roomId") Long roomId, @PathVariable("memberId") Long memberId) { - notificationService.sendKnockNotification(member, memberId, roomId); + notificationService.sendKnock(member, memberId, roomId); } } diff --git a/src/main/resources/config b/src/main/resources/config index 2a1a59a1..2b721299 160000 --- a/src/main/resources/config +++ b/src/main/resources/config @@ -1 +1 @@ -Subproject commit 2a1a59a16d8e868185c125a58aec0682f3c53f0d +Subproject commit 2b7212992e491c6d222f0b6a9b9289525be07008 diff --git a/src/main/resources/static/docs/coupon.html b/src/main/resources/static/docs/coupon.html index 1ac3df18..07dee99b 100644 --- a/src/main/resources/static/docs/coupon.html +++ b/src/main/resources/static/docs/coupon.html @@ -2132,13 +2132,13 @@

요청

POST /admins/coupons HTTP/1.1
 Content-Type: application/json;charset=UTF-8
-Content-Length: 192
+Content-Length: 186
 Host: localhost:8080
 
 {
   "name" : "couponName",
   "description" : "coupon description",
-  "couponType" : "황금",
+  "type" : "황금",
   "point" : 10,
   "stock" : 10,
   "startAt" : "2023-01-01T00:00",
@@ -2240,13 +2240,13 @@ 

요청

POST /coupons/search HTTP/1.1
 Content-Type: application/json;charset=UTF-8
-Content-Length: 84
+Content-Length: 66
 Host: localhost:8080
 
 {
-  "couponOngoing" : false,
-  "couponNotStarted" : false,
-  "couponEnded" : false
+  "ongoing" : false,
+  "notStarted" : false,
+  "ended" : false
 }
@@ -2324,10 +2324,9 @@

쿠폰 사용 (진행 중)