From d0499d1735874bbef78bf6b5cfbf7c0db1a1c4a2 Mon Sep 17 00:00:00 2001 From: zzu-yaaa Date: Tue, 30 Jul 2024 13:01:53 +0900 Subject: [PATCH 1/2] =?UTF-8?q?response=20dto=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/dto/response/UserSearchResponse.java | 11 ++++------- src/main/resources/application-local.yaml | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/leets/commitatobe/domain/user/presentation/dto/response/UserSearchResponse.java b/src/main/java/com/leets/commitatobe/domain/user/presentation/dto/response/UserSearchResponse.java index 01bded6..ecba9ae 100644 --- a/src/main/java/com/leets/commitatobe/domain/user/presentation/dto/response/UserSearchResponse.java +++ b/src/main/java/com/leets/commitatobe/domain/user/presentation/dto/response/UserSearchResponse.java @@ -1,13 +1,10 @@ package com.leets.commitatobe.domain.user.presentation.dto.response; public record UserSearchResponse( - String username, - Integer exp, + Integer ranking, + String githubId, String tierName, - String characterUrl, - Integer consecutiveCommitDays, - Integer totalCommitCount, - Integer todayCommitCount, - Integer ranking + Integer exp, + Integer consecutiveCommitDays ) { } diff --git a/src/main/resources/application-local.yaml b/src/main/resources/application-local.yaml index 3ebf795..79c6981 100644 --- a/src/main/resources/application-local.yaml +++ b/src/main/resources/application-local.yaml @@ -2,12 +2,12 @@ spring: datasource: url: jdbc:mysql://localhost:3306/commitato username: root - password: + password: 1220 driver-class-name: com.mysql.cj.jdbc.Driver jpa: show-sql: true hibernate: - ddl-auto: create-drop + ddl-auto: update database: mysql database-platform: org.hibernate.dialect.MySQLDialect properties: From ac69bd0296bff30122b7e1a1b993c7edeb40e84b Mon Sep 17 00:00:00 2001 From: zzu-yaaa Date: Tue, 30 Jul 2024 13:04:21 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20response=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=ED=95=84=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/usecase/UserQueryServiceImpl.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/leets/commitatobe/domain/user/usecase/UserQueryServiceImpl.java b/src/main/java/com/leets/commitatobe/domain/user/usecase/UserQueryServiceImpl.java index e750e60..a5d2c67 100644 --- a/src/main/java/com/leets/commitatobe/domain/user/usecase/UserQueryServiceImpl.java +++ b/src/main/java/com/leets/commitatobe/domain/user/usecase/UserQueryServiceImpl.java @@ -35,14 +35,11 @@ public UserSearchResponse searchUsersByGithubId(String githubId) {// 유저 이 Tier tier = user.getTier(); return new UserSearchResponse( - user.getUsername(), - user.getExp(), + user.getRanking(), + user.getGithubId(), tier.getTierName(), - tier.getCharacterUrl(), user.getConsecutiveCommitDays(), - user.getTotalCommitCount(), - user.getTodayCommitCount(), - user.getRanking() + user.getExp() ); }