Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
9030dc4
feat: diary 관련 작업한거 옮겨둠
qkrcodus Jul 29, 2025
54f7416
feat: diary가 logBook 이 아닌 logBaseInfo랑 연관관계 갖도록 수정
qkrcodus Jul 29, 2025
e70b154
feat: DiaryRepository에logBaseInfoId + memberId 조합 조회 메서드 추가
qkrcodus Jul 29, 2025
c318966
fix: 컨트롤러 @PathVariable 이름 logBaseInfoId로 수정하여 바인딩 오류 해결
qkrcodus Jul 29, 2025
6e59e19
fix: DiaryRepository @Query로 logBaseInfoId,memberId 조회 메서드 수정 및 Diary…
qkrcodus Jul 29, 2025
5fabfca
refactor: DiaryService 내부 logId → logBaseInfoId로 변수명 명확화
qkrcodus Jul 29, 2025
0ba70e6
refactor: DiaryService 내부 logId → logBaseInfoId로 변수명 수정
qkrcodus Jul 29, 2025
ea13dc3
docs: 패키지 구조 변경
qkrcodus Jul 31, 2025
4393774
docs: column 명 스네이크 케이스로 통일
qkrcodus Jul 31, 2025
22d7ce2
merge: conflict 해결
qkrcodus Aug 1, 2025
3e234a8
docs: 패키지 구조 변경
qkrcodus Jul 31, 2025
3c27aa3
fix: 컨트롤러 @PathVariable 이름 logBaseInfoId로 수정하여 바인딩 오류 해결
qkrcodus Jul 29, 2025
823ab39
feat: DiaryRepository에logBaseInfoId + memberId 조합 조회 메서드 추가
qkrcodus Jul 29, 2025
e3fe661
docs: column 명 스네이크 케이스로 통일
qkrcodus Jul 31, 2025
b5ae24a
refactor: 에러코드 LOG_NOT_FOUND -> LOG_BASE_NOT_FOUND 로 수정
qkrcodus Jul 31, 2025
d7aa690
refactor: 일기 권한 및 존재 여부를 구분하여 에러 코드 반환되게 수정
qkrcodus Jul 31, 2025
a53c8ac
refactor: @EntityGraph 제거
qkrcodus Jul 31, 2025
78c3782
refactor: controller 에서 swagger 예외 코드 LOG_NOT_FOUND -> LOG_BASE_NOT_F…
qkrcodus Jul 31, 2025
6c1456a
docs: 코드순서 변경 및 주석 추가
qkrcodus Jul 31, 2025
f90012d
refactor: 로그베이스 접근 권한 검증 로직 LogBaseInfoService로 분리
qkrcodus Jul 31, 2025
aeb2738
docs: 불필요한 diary 패키지 삭제
qkrcodus Aug 1, 2025
59f7a5a
Merge remote-tracking branch 'origin/develop' into feat/#83-diary-cru…
qkrcodus Aug 1, 2025
03ab40c
refactor: 누락된 saveStatus 추가
qkrcodus Aug 1, 2025
69f2a60
refactor: createLogDetail 에서 findById -> findByIdAndMemberId으로 수정
qkrcodus Aug 1, 2025
8f6049b
Merge pull request #84 from DivaryOfficial/feat/#83-diary-cru-api
qkrcodus Aug 1, 2025
62c70ca
feat/#77- 알림 열람 true로 변경
worhs02 Jul 28, 2025
f43a961
feat/#77: 하드코딩 제거
worhs02 Jul 28, 2025
f806f71
feat/#77: get method response에 알림 id 추가
worhs02 Jul 28, 2025
759bea1
feat/#77: member객체 조회 안하도록 변경, 트랜잭션 적용 변경, import 변경
worhs02 Jul 29, 2025
b5c1789
feat/#77: 수신인 id로 멤버를 찾게 변경
worhs02 Jul 31, 2025
39345fd
feat/#77: 본인 알림인지 확인해야해서 userId도 사용
worhs02 Jul 31, 2025
e400845
feat/#85:로그북 베이스 기존 존재 여부 검증에 대한 로직 추가
sereene Aug 1, 2025
fd1726c
fix/#85:createLogBase에서는 날짜 검증 로직 뺌
sereene Aug 1, 2025
8b0144a
Merge pull request #78 from DivaryOfficial/feat/#77-patch-isRead
worhs02 Aug 4, 2025
886b59e
feat/#75: 자격증 이미지 등록 및 레벨 패치
worhs02 Jul 27, 2025
ffe388b
feat/#75: @valid추가
worhs02 Jul 28, 2025
187a2c8
feat/#75: ApiResponse로 변경, import와 transaction 변경
worhs02 Jul 29, 2025
e531bfd
feat/#75: 멤버 도메인으로 이동, 이미지는 /api/v1/images/upload/type/{imageType}로 관리
worhs02 Jul 31, 2025
4e99656
feat/#75: 라이센스 업로드
worhs02 Aug 1, 2025
38691eb
feat/#75: controller 수정
worhs02 Aug 1, 2025
ed22b3d
feat/#75: 어노테이션 제거 및 mapping 수정
worhs02 Aug 4, 2025
31ec12d
feat/#75: develop pull
worhs02 Aug 4, 2025
7733bfd
feat/#75: 완료된 todo제거
worhs02 Aug 4, 2025
34554d9
Merge pull request #76 from DivaryOfficial/feat/#75-MyPage-Level-Picture
worhs02 Aug 4, 2025
9d4907a
feat/#81: 버디펫 크기 및 각도 추가 enum 변경
worhs02 Jul 29, 2025
2ecf4a3
feat/#81: patch -> put/ upsert로 변경
worhs02 Jul 29, 2025
f0797a9
feat/#81: @notNull추가, 아바타가 없을때만 member조회 후 builder호출
worhs02 Jul 31, 2025
2d6bb55
feat/#81: 말풍선 텍스트 주석 추가
worhs02 Aug 4, 2025
79e1ae8
feat/#81: null 가능하게 변경
worhs02 Aug 4, 2025
b032237
Merge pull request #82 from DivaryOfficial/feat/#81-change-bubbleEnum…
worhs02 Aug 4, 2025
b7e41e2
fix/#85:트랜잭션 삭제 및 어노테이션 수정
sereene Aug 4, 2025
f12fe0a
Merge pull request #88 from DivaryOfficial/feat/#85-log-verification
sereene Aug 5, 2025
0eb92a9
fix: ImageService 시그니처 변경에 따른 호출부 코드 수정
qkrcodus Aug 6, 2025
41e0a9d
Merge pull request #93 from DivaryOfficial/fix/#92-get-encyclopeida
qkrcodus Aug 7, 2025
8bbf16b
fix/#94:로그 put request dto 수정
sereene Aug 7, 2025
e0ff430
fix: 도감 카드 목록 조회 시 이미지가 누락되는 문제 해결
qkrcodus Aug 7, 2025
7e37acf
Merge pull request #98 from DivaryOfficial/fix/#95-get-encyclopediacard
qkrcodus Aug 8, 2025
749fc27
Merge pull request #96 from DivaryOfficial/fix/#94-log-put-api
Baguette-bbang Aug 8, 2025
c7250a4
feat: OpenAI 스트리밍 API용 WebClient 설정 추가
Baguette-bbang Aug 5, 2025
e6f9017
feat: OpenAI 스트림 API 연동 구현
Baguette-bbang Aug 5, 2025
83a81fe
feat: SSE 연결 관리 시스템 구현
Baguette-bbang Aug 5, 2025
74d6ce2
feat: SSE 이벤트 시스템 구현
Baguette-bbang Aug 5, 2025
b485c55
feat: iOS 호환 SSE 스트리밍 채팅 엔드포인트 및 CORS 설정 추가
Baguette-bbang Aug 6, 2025
114202a
feat: SSE 스트리밍에 대화 히스토리 처리 로직 추가
Baguette-bbang Aug 6, 2025
8cb6a96
fix: OpenAI API URL 중복 경로 오류 수정
Baguette-bbang Aug 7, 2025
314eae9
fix: OpenAI 스트리밍 응답 파싱 로직 개선
Baguette-bbang Aug 7, 2025
24b6d1e
feat: macOS 개발환경 의존성 추가
Baguette-bbang Aug 7, 2025
7c18a83
refactor: SSE 스트리밍 서비스 개선 및 보안 강화
Baguette-bbang Aug 7, 2025
48447e0
chore : 주석, 줄바꿈 정리
Baguette-bbang Aug 7, 2025
1951399
chore : 쓸모없는 파일 제거
Baguette-bbang Aug 7, 2025
9a67ae8
Merge pull request #97 from DivaryOfficial/feat/#91-openai-streaming-…
Baguette-bbang Aug 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// WebFlux (WebClient for streaming)
implementation 'org.springframework.boot:spring-boot-starter-webflux'

// macOS DNS 최적화
runtimeOnly 'io.netty:netty-resolver-dns-native-macos:4.1.108.Final:osx-aarch_64'

//security
implementation 'org.springframework.boot:spring-boot-starter-security'
testImplementation 'org.springframework.security:spring-security-test'
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/com/divary/domain/Member/enums/Level.java

This file was deleted.

5 changes: 0 additions & 5 deletions src/main/java/com/divary/domain/Member/enums/Role.java

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
import com.divary.domain.avatar.dto.AvatarResponseDTO;
import com.divary.domain.avatar.entity.Avatar;
import com.divary.domain.avatar.service.AvatarService;
import com.divary.global.config.SwaggerConfig;
import com.divary.global.config.security.CustomUserPrincipal;
import com.divary.global.exception.ErrorCode;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;

@RestController
Expand All @@ -15,15 +20,21 @@
public class AvatarController {
private final AvatarService avatarService;

@PatchMapping
public ApiResponse<String> saveAvatar(@RequestBody @Valid AvatarRequestDTO avatarRequestDTO) {
avatarService.patchAvatar(avatarRequestDTO);
return ApiResponse.success("아바타 저장에 성공했습니다.", null);
@PutMapping
@Operation(summary = "아바타 저장", description = "아바타를 저장합니다")
@SwaggerConfig.ApiSuccessResponse(dataType = Void.class)
@SwaggerConfig.ApiErrorExamples(value = {ErrorCode.AVATAR_NOT_FOUND, ErrorCode.AUTHENTICATION_REQUIRED})
public ApiResponse saveAvatar(@AuthenticationPrincipal CustomUserPrincipal userPrincipal, @RequestBody @Valid AvatarRequestDTO avatarRequestDTO) {
avatarService.upsertAvatar(userPrincipal.getId(), avatarRequestDTO);
return ApiResponse.success(null);
}

@GetMapping
public ApiResponse<AvatarResponseDTO> getAvatar(){
//TODO buddypet json으로 변경할수도 있음
return ApiResponse.success("아바타 조회에 성공했습니다.", avatarService.getAvatar());
@Operation(summary = "아바타 조회", description = "아바타를 조회합니다")
@SwaggerConfig.ApiSuccessResponse(dataType = AvatarResponseDTO.class)
@SwaggerConfig.ApiErrorExamples(value = {ErrorCode.AVATAR_NOT_FOUND, ErrorCode.AUTHENTICATION_REQUIRED})
public ApiResponse<AvatarResponseDTO> getAvatar (@AuthenticationPrincipal CustomUserPrincipal userPrincipal) {
return ApiResponse.success("아바타 조회에 성공했습니다.", avatarService.getAvatar(userPrincipal.getId()));

}
}
33 changes: 22 additions & 11 deletions src/main/java/com/divary/domain/avatar/dto/AvatarRequestDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,55 @@
import com.divary.domain.avatar.enums.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;

import java.util.List;

@Getter
public class AvatarRequestDTO {
@Schema(description = "아바타 이름", example = "아진봇", nullable = true)
@Schema(description = "아바타 이름", example = "아진봇")
@Size(max = 20, message = "이름은 최대 20자까지 입력 가능합니다.")
@NotBlank(message = "이름을 입력해주세요.")
@Pattern(
regexp = "^(?!\\s*$)[\\p{L}\\p{N}\\p{Zs}\\p{So}]{1,20}$",
regexp = "[\\p{L}\\p{N}\\p{Zs}\\p{So}]{1,20}",
message = "이름은 특수문자를 제외한 한글, 영문, 숫자, 공백, 이모지만 사용할 수 있습니다."
)
private String name;

@Schema(description = "탱크 색깔", example = "WHITE", nullable = true)
@Schema(description = "탱크 색깔", example = "YELLOW")
private Tank tank;

@Schema(description = "몸 색상", example = "IVORY", nullable = true)
@Schema(description = "몸 색상", example = "IVORY")
@NotNull
private BodyColor bodyColor;

@Schema(description = "버디펫", example = "AXOLOTL", nullable = true)
private BudyPet budyPet;
@Schema(description = "버디펫 정보 리스트")
private BuddyPetInfoDTO buddyPetInfo;


@Schema(description = "말풍선 텍스트", example = "Hi i'm buddy")
private String bubbleText;

@Schema(description = "볼 색상", example = "PINK", nullable = true)
@Schema(description = "볼 색상", example = "PINK")
@NotNull
private CheekColor cheekColor;

@Schema(description = "말풍선 타입", example = "WHITE", nullable = true) //임시 enum 값 바꿔야 함
@Schema(description = "말풍선 타입", example = "OVAL_TAILED")
private SpeechBubble speechBubble;

@Schema(description = "마스크 샐깔", example = "WHITE", nullable = true)
@Schema(description = "마스크 샐깔", example = "WHITE")
private Mask mask;

@Schema(description = "핀 색깔", example = "WHITE", nullable = true)
@Schema(description = "핀 색깔", example = "WHITE")
private Pin pin;

@Schema(description = "레귤레이터 색깔", example = "BLACK", nullable = true)
@Schema(description = "레귤레이터 색깔", example = "WHITE")
private Regulator regulator;

@Schema(description = "테마", example = "CORAL_FOREST")
@NotNull
private Theme theme;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ public class AvatarResponseDTO {
private Tank tank;
private BodyColor bodyColor;
private BudyPet budyPet;
private String bubbleText;
private CheekColor cheekColor;
private SpeechBubble speechBubble;
private BuddyPetInfoDTO buddyPetInfo;
private Mask mask;
private Pin pin;
private Regulator regulator;
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/com/divary/domain/avatar/dto/BuddyPetInfoDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.divary.domain.avatar.dto;

import com.divary.domain.avatar.enums.BudyPet;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BuddyPetInfoDTO {

@Schema(description = "버디펫 종류", example = "AXOLOTL")
private BudyPet budyPet;

@Schema(description = "회전 각도 (도 단위)", example = "15.0")
private Double rotation;

@Schema(description = "크기 배율", example = "1.2")
private Double scale;
}
51 changes: 32 additions & 19 deletions src/main/java/com/divary/domain/avatar/entity/Avatar.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.divary.domain.avatar.entity;

import com.divary.common.entity.BaseEntity;
import com.divary.domain.Member.entity.Member;
import com.divary.domain.member.entity.Member;
import com.divary.domain.avatar.enums.*;
import jakarta.persistence.*;
import lombok.*;
Expand All @@ -19,45 +19,58 @@ public class Avatar extends BaseEntity {
private Member user;

@Column(length = 20)
private String name;
@Builder.Default
private String name = "버디";

@Builder.Default
@Column(nullable = false, name = "body_color")
@Column(nullable = false,name = "body_color")
@Enumerated(EnumType.STRING)
private BodyColor bodyColor = BodyColor.IVORY;

@Builder.Default
@Column(nullable = false, name = "eye_color")
@Column(nullable = true, name = "buble_text")
private String bubbleText;


@Column(nullable = true, name = "speechBubble")
@Enumerated(EnumType.STRING)
private SpeechBubble speechBubble = SpeechBubble.NONE;
private SpeechBubble speechBubble;


@Builder.Default
@Column(nullable = false, name = "cheek_color")
@Enumerated(EnumType.STRING)
private CheekColor cheekColor = CheekColor.NONE;
private CheekColor cheekColor;


@Builder.Default
@Enumerated(EnumType.STRING)
private Mask mask = Mask.NONE;
@Column(nullable = true, name = "mask")
private Mask mask;


@Builder.Default
@Enumerated(EnumType.STRING)
private Regulator regulator = Regulator.NONE;
@Column(nullable = true, name = "regulator")
private Regulator regulator;

@Builder.Default
@Enumerated(EnumType.STRING)
private Pin pin = Pin.NONE;
@Column(nullable = true, name = "pin")
private Pin pin;

@Builder.Default
@Enumerated(EnumType.STRING)
private Tank tank = Tank.NONE;
@Column(nullable = true, name = "tank")
private Tank tank;


@Builder.Default
@Enumerated(EnumType.STRING)
@Column(name = "budy_pet")
private BudyPet budyPet = BudyPet.NONE;
@Column(nullable = true, name = "budy_pet")
private BudyPet budyPet;

@Column(nullable = true, name = "pet_rotation")
private Double petRotation;

@Column(nullable = true, name = "pet_scale")
private Double petScale;

@Builder.Default
@Enumerated(EnumType.STRING)
@Column(nullable = false, name = "theme")
private Theme theme = Theme.CORAL_FOREST;
}
1 change: 0 additions & 1 deletion src/main/java/com/divary/domain/avatar/enums/BudyPet.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.divary.domain.avatar.enums;

public enum BudyPet {
NONE, // 없음
HERMIT_CRAB, // 소라게
SEAHORSE, // 아기해마
AXOLOTL, // 우파루파
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.divary.domain.avatar.enums;

public enum CheekColor {
NONE, // 없음 (기본값)
PEACH, // 연살구색
APRICOT,
CORAL, // 코랄 (살구보다 진함)
SALMON, // 연어색 (좀 더 붉은 느낌)
PINK // 핑크
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/divary/domain/avatar/enums/Mask.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.divary.domain.avatar.enums;

public enum Mask {
NONE,
WHITE,
GOLD,
GREEN
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/divary/domain/avatar/enums/Pin.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.divary.domain.avatar.enums;

public enum Pin {
NONE,
WHITE,
YELLOW,
PINK
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/divary/domain/avatar/enums/Regulator.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.divary.domain.avatar.enums;

public enum Regulator {
NONE,
BLACK,
WHITE,
YELLOW,
PINK
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.divary.domain.avatar.enums;

public enum SpeechBubble {
NONE, // 없음 (슬래시 아이콘)
BLUE, // 파란 말풍선
WHITE, // 흰색 말풍선
GRAY, // 회색 말풍선
LIGHT_GRAY // 연회색 말풍선
ROUND_SQUARE,
ROUND_SQUARE_TAILED,
OVAL_TAILED,
OVAL_CIRCLE_TAILED
}
3 changes: 1 addition & 2 deletions src/main/java/com/divary/domain/avatar/enums/Tank.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.divary.domain.avatar.enums;

public enum Tank {
NONE,
BLACK,
WHITE,
YELLOW,
PINK
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.divary.domain.avatar.repository;


import com.divary.domain.Member.entity.Member;
import com.divary.domain.member.entity.Member;
import com.divary.domain.avatar.entity.Avatar;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface AvatarRepository extends JpaRepository<Avatar, Long> {
Optional<Avatar> findByUser(Member user);
Avatar findByUserId(Long userId);
}
Loading