From 4a3c7bfcdf4bb11b986eb97acc91f71b89280863 Mon Sep 17 00:00:00 2001 From: emost22 Date: Fri, 1 Mar 2024 19:21:29 +0900 Subject: [PATCH] [#noissue] Feat: add logs save pin service --- .../domain/pin/dto/response/PinRedisRes.java | 28 +++++++++++++++++++ .../audy/domain/pin/service/PinService.java | 1 + 2 files changed, 29 insertions(+) diff --git a/src/main/java/com/pcb/audy/domain/pin/dto/response/PinRedisRes.java b/src/main/java/com/pcb/audy/domain/pin/dto/response/PinRedisRes.java index 4518a74..2a77a11 100644 --- a/src/main/java/com/pcb/audy/domain/pin/dto/response/PinRedisRes.java +++ b/src/main/java/com/pcb/audy/domain/pin/dto/response/PinRedisRes.java @@ -45,4 +45,32 @@ public int compareTo(PinRedisRes other) { LexoRank otherRank = LexoRank.parse(other.sequence); return thisRank.compareTo(otherRank); } + + @Override + public String toString() { + return "PinSaveReq {" + + ", courseId='" + + courseId + + '\'' + + ", pinId='" + + pinId + + '\'' + + ", pinName='" + + pinName + + '\'' + + ", originName='" + + originName + + '\'' + + ", latitude=" + + latitude + + ", longitude=" + + longitude + + ", address='" + + address + + '\'' + + ", sequence='" + + sequence + + '\'' + + '}'; + } } diff --git a/src/main/java/com/pcb/audy/domain/pin/service/PinService.java b/src/main/java/com/pcb/audy/domain/pin/service/PinService.java index 07b5588..057cd2f 100644 --- a/src/main/java/com/pcb/audy/domain/pin/service/PinService.java +++ b/src/main/java/com/pcb/audy/domain/pin/service/PinService.java @@ -34,6 +34,7 @@ public PinSaveRes savePin(Long courseId, PinSaveReq pinSaveReq) { String sequence = lexoRankUtil.getLexoRank(courseId, size); PinRedisRes pinRedisRes = PinServiceMapper.INSTANCE.toPinRedisRes(pinSaveReq, courseId, sequence); + log.info("PinRedisRes: " + pinRedisRes.toString()); redisProvider.setPin(getKey(courseId, pinRedisRes.getPinId()), pinRedisRes, PIN_EXPIRE_TIME); return PinServiceMapper.INSTANCE.toPinSaveRes(pinRedisRes); }