diff --git a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderDto.java b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderDto.java index c056982..b1341d9 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderDto.java +++ b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderDto.java @@ -21,5 +21,6 @@ public class OrderDto { private LocalDateTime time; private String method; private Long price; + private Long salePrice; private boolean isCouponUsed; } diff --git a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java index 02b6469..fc93ba3 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java +++ b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java @@ -30,7 +30,8 @@ private OrderDto toOrderDto(Order order) { .pickUp(order.getInOut()) .time(order.getCreatedAt()) .phone(order.getUserInfo().getPhone()) - .price(order.getAmount()) + .price(order.getTotalAmount()) + .salePrice(order.getAmount()) .method(order.getMethod()) .foodies(order.getCart() .getCartItems() diff --git a/src/main/java/com/readyvery/readyverydemo/src/smsauthentication/VerificationService.java b/src/main/java/com/readyvery/readyverydemo/src/smsauthentication/VerificationService.java index 04e7c5b..2c9a045 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/smsauthentication/VerificationService.java +++ b/src/main/java/com/readyvery/readyverydemo/src/smsauthentication/VerificationService.java @@ -16,8 +16,8 @@ public class VerificationService { public String createVerificationCode(String phoneNumber, boolean someBooleanValue) { String code = UUID.randomUUID().toString().substring(0, 6); - redisTemplate.opsForValue().set(phoneNumber + ":code", code, 5, TimeUnit.MINUTES); - redisTemplate.opsForValue().set(phoneNumber + ":flag", String.valueOf(someBooleanValue), 5, TimeUnit.MINUTES); + redisTemplate.opsForValue().set(phoneNumber + ":code", code, 3, TimeUnit.MINUTES); + redisTemplate.opsForValue().set(phoneNumber + ":flag", String.valueOf(someBooleanValue), 3, TimeUnit.MINUTES); return code; } @@ -28,7 +28,7 @@ public boolean verifyCode(String phoneNumber, String code) { String storedCode = redisTemplate.opsForValue().get(storedCodeKey); if (storedCode != null && storedCode.equals(code)) { // 인증 코드가 일치하면 플래그 값을 true로 설정 - redisTemplate.opsForValue().set(flagKey, "true", 5, TimeUnit.MINUTES); + redisTemplate.opsForValue().set(flagKey, "true", 3, TimeUnit.MINUTES); return true; } else { return false; @@ -47,8 +47,8 @@ public boolean verifyNumberToChangePassword(String phoneNumber) { public String createVerificationCodeToChangePassword(String phoneNumber, boolean someBooleanValue) { String code = UUID.randomUUID().toString().substring(0, 6); - redisTemplate.opsForValue().set(phoneNumber + ":pwcode", code, 5, TimeUnit.MINUTES); - redisTemplate.opsForValue().set(phoneNumber + ":pwflag", String.valueOf(someBooleanValue), 5, TimeUnit.MINUTES); + redisTemplate.opsForValue().set(phoneNumber + ":pwcode", code, 3, TimeUnit.MINUTES); + redisTemplate.opsForValue().set(phoneNumber + ":pwflag", String.valueOf(someBooleanValue), 3, TimeUnit.MINUTES); return code; } @@ -59,7 +59,7 @@ public boolean verifyCodeToChangePassword(String phoneNumber, String code) { String storedCode = redisTemplate.opsForValue().get(storedCodeKey); if (storedCode != null && storedCode.equals(code)) { // 인증 코드가 일치하면 플래그 값을 true로 설정 - redisTemplate.opsForValue().set(flagKey, "true", 5, TimeUnit.MINUTES); + redisTemplate.opsForValue().set(flagKey, "true", 3, TimeUnit.MINUTES); return true; } else { return false;