-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [style] : 코드 리포멧팅 * [style] : 코드 리포멧팅 * [feat] : 채팅방 목록 조회 API 채팅방 상세 필드 추가 * [feat] : 채팅방 상태 리스트 -> 라벨 리스트 변환 함수 추가 * [feat] : 채팅방 목록 조회 상태 필드 리스트로 변경 * [test] : 채팅방 목록 조회 상태 필드 리스트로 변경 테스트 반영
- Loading branch information
Showing
19 changed files
with
453 additions
and
442 deletions.
There are no files selected for viewing
16 changes: 9 additions & 7 deletions
16
src/main/java/com/dnd/gongmuin/answer/repository/AnswerRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
package com.dnd.gongmuin.answer.repository; | ||
|
||
import com.dnd.gongmuin.answer.domain.Answer; | ||
import com.dnd.gongmuin.member.domain.Member; | ||
import java.util.List; | ||
|
||
import org.springframework.data.domain.Slice; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import com.dnd.gongmuin.answer.domain.Answer; | ||
import com.dnd.gongmuin.member.domain.Member; | ||
|
||
@Repository | ||
public interface AnswerRepository extends JpaRepository<Answer, Long> { | ||
|
||
Slice<Answer> findByQuestionPostId(Long questionPostId); | ||
Slice<Answer> findByQuestionPostId(Long questionPostId); | ||
|
||
List<Answer> findAllByMember(Member member); | ||
List<Answer> findAllByMember(Member member); | ||
|
||
@Modifying(flushAutomatically = true, clearAutomatically = true) | ||
@Query("UPDATE Answer a SET a.member = :member WHERE a.member.id = :memberId") | ||
public void updateAnswersMember(Long memberId, Member member); | ||
@Modifying(flushAutomatically = true, clearAutomatically = true) | ||
@Query("UPDATE Answer a SET a.member = :member WHERE a.member.id = :memberId") | ||
void updateAnswersMember(Long memberId, Member member); | ||
} |
337 changes: 170 additions & 167 deletions
337
src/main/java/com/dnd/gongmuin/auth/service/AuthService.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
src/main/java/com/dnd/gongmuin/member/repository/MemberRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
package com.dnd.gongmuin.member.repository; | ||
|
||
import com.dnd.gongmuin.member.domain.Member; | ||
import java.util.Optional; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import com.dnd.gongmuin.member.domain.Member; | ||
|
||
@Repository | ||
public interface MemberRepository extends JpaRepository<Member, Long>, MemberCustom { | ||
Optional<Member> findBySocialEmail(String socialEmail); | ||
Optional<Member> findBySocialEmail(String socialEmail); | ||
|
||
boolean existsByNickname(String nickname); | ||
boolean existsByNickname(String nickname); | ||
|
||
boolean existsByOfficialEmail(String officialEmail); | ||
boolean existsByOfficialEmail(String officialEmail); | ||
|
||
boolean existsBySocialEmail(String socialEmail); | ||
boolean existsBySocialEmail(String socialEmail); | ||
|
||
Member findByOfficialEmail(String officialEmail); | ||
Member findByOfficialEmail(String officialEmail); | ||
|
||
Optional<Member> findByRole(String role); | ||
Optional<Member> findByRole(String role); | ||
|
||
} |
7 changes: 4 additions & 3 deletions
7
src/main/java/com/dnd/gongmuin/notification/repository/NotificationRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package com.dnd.gongmuin.notification.repository; | ||
|
||
import com.dnd.gongmuin.member.domain.Member; | ||
import com.dnd.gongmuin.notification.domain.Notification; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import com.dnd.gongmuin.member.domain.Member; | ||
import com.dnd.gongmuin.notification.domain.Notification; | ||
|
||
@Repository | ||
public interface NotificationRepository extends JpaRepository<Notification, Long>, NotificationCustom { | ||
void deleteByMember(Member member); | ||
void deleteByMember(Member member); | ||
} |
16 changes: 9 additions & 7 deletions
16
src/main/java/com/dnd/gongmuin/question_post/repository/QuestionPostRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
package com.dnd.gongmuin.question_post.repository; | ||
|
||
import com.dnd.gongmuin.member.domain.Member; | ||
import com.dnd.gongmuin.question_post.domain.QuestionPost; | ||
import java.util.List; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import com.dnd.gongmuin.member.domain.Member; | ||
import com.dnd.gongmuin.question_post.domain.QuestionPost; | ||
|
||
@Repository | ||
public interface QuestionPostRepository extends JpaRepository<QuestionPost, Long>, QuestionPostQueryRepository { | ||
boolean existsById(Long id); | ||
boolean existsById(Long id); | ||
|
||
List<QuestionPost> findAllByMember(Member member); | ||
List<QuestionPost> findAllByMember(Member member); | ||
|
||
@Modifying(flushAutomatically = true, clearAutomatically = true) | ||
@Query("UPDATE QuestionPost q SET q.member = :member WHERE q.member.id = :memberId") | ||
public void updateQuestionPostsMember(Long memberId, Member member); | ||
@Modifying(flushAutomatically = true, clearAutomatically = true) | ||
@Query("UPDATE QuestionPost q SET q.member = :member WHERE q.member.id = :memberId") | ||
public void updateQuestionPostsMember(Long memberId, Member member); | ||
} |
Oops, something went wrong.