Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8c85b47
refactor/336 입금 환전 내역 수정
yoostill Oct 14, 2025
393dd85
refactor/336 입금 환전 내역 수정
yoostill Oct 14, 2025
c869590
refactor/336 작가 수익 테스트 수정
yoostill Oct 14, 2025
ce4504d
refactor/336 대시보드 메인현황 팔로우수 추가
yoostill Oct 14, 2025
f436577
refactor/336 대시보드 메인현황 팔로우수 테스트 케이스 작성
yoostill Oct 14, 2025
4d13af0
refactor/336 대시보드 팔로우 작가 조회
yoostill Oct 14, 2025
3f4ccc9
refactor/336 대시보드 팔로우 작가 조회
yoostill Oct 14, 2025
6b20d46
pull 충돌 해결
yoostill Oct 14, 2025
b65e507
Merge branch 'develop' of https://github.com/prgrms-web-devcourse-fin…
yoostill Oct 14, 2025
0b4d76d
refactor/336 Response 수정
yoostill Oct 14, 2025
d96f468
refactor/354리뷰 mock 제거 실제 db연동
yoostill Oct 14, 2025
bd948e0
refactor/354 레파지토리에 찜 기능 조회 추가
yoostill Oct 14, 2025
19b26b6
refactor/354 찜 테스트 기능 추가 및 테스트 오류 수정
yoostill Oct 14, 2025
89e3598
push전 충돌잡기
yoostill Oct 15, 2025
8e887ea
Merge branch 'develop' into refactir/354
yoostill Oct 15, 2025
ecf514f
refactor/354 찜 기능 수정 및 팔로우 기능 수정
yoostill Oct 15, 2025
6d94068
refactor/354 찜 기능 수정 및 팔로우 기능 수정
yoostill Oct 15, 2025
87642d2
refactor/354 찜 기능 수정 및 팔로우 기능 수정
yoostill Oct 15, 2025
e503676
merge: resolve conflicts
yoostill Oct 15, 2025
ce31604
refactor/367 이미지 사용 우선 순위 변경
yoostill Oct 15, 2025
b7ee52d
refactor/367 상품명 정렬 수정
yoostill Oct 15, 2025
9d1b5dc
refactor/367 교환 요청 조회 정렬 메모리->db 정렬로 변경
yoostill Oct 15, 2025
ccd719d
refactor/367 메인현황-상품명 정렬 추가,
yoostill Oct 15, 2025
fd4fb60
Merge branch 'develop' of https://github.com/prgrms-web-devcourse-fin…
yoostill Oct 15, 2025
fec3a5a
refactor/367 관리자대시보드-카테고리 조회 제거
yoostill Oct 15, 2025
44851be
refactor/367 관리자대시보드-사용자관리 수수료율 정리 수정
yoostill Oct 15, 2025
c5d9b2a
refactor/367 관리자대시보드-전체 펀딩 목록보기 Resoponse간소화
yoostill Oct 15, 2025
d40e491
refactor/367 관리자대시보드-전체 펀딩 목록보기 Resoponse간소화
yoostill Oct 15, 2025
3dfda67
refactor/367 관리자대시보드-입점 승인 정렬 수정
yoostill Oct 15, 2025
eb82d72
Merge branch 'develop' of https://github.com/prgrms-web-devcourse-fin…
yoostill Oct 15, 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
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,52 @@ public interface ArtistApplicationRepository extends JpaRepository<ArtistApplica
Optional<ArtistApplication> findFirstByUserIdOrderByCreateDateDesc(Long userId); // 최근 신청 1건 조회
boolean existsByUserIdAndStatus(Long userId, ApplicationStatus status); // 중복 신청 방지용 - 특정 상태의 작가 신청서 존재 여부 확인


// ==== 관리자용 ==== //
Page<ArtistApplication> findAllByOrderByCreateDateDesc(Pageable pageable); // 모든 작가 신청서 조회
Page<ArtistApplication> findByStatusOrderByCreateDateDesc( // 상태별 작가 신청서 조회
ApplicationStatus status, Pageable pageable);
long countByStatus(ApplicationStatus status); // 대시보드 통계용 - 특정 상태의 작가 신청서 개수 조회

// 검색
@Query("SELECT a FROM ArtistApplication a WHERE a.artistName LIKE %:artistName% ORDER BY a.createDate DESC")
Page<ArtistApplication> findByArtistNameContainingOrderByCreateDateDesc( // 작가명 검색
@Param("artistName") String artistName, Pageable pageable
);

// userId로 조회
Optional<ArtistApplication> findByUserId(Long userId);

// ==== 관리자 대시보드용 - 동적 정렬 지원 ==== //
/**
* 관리자 입점 신청 목록 조회 (검색 + 필터링 + 동적 정렬)
*
* 기능:
* - 작가명, 이메일, 작가ID로 검색 (keyword)
* - 상태별 필터링 (status)
* - 작가ID, 작가명, 신청일자, 상태로 정렬 (sort, order)
*
* @param keyword 검색어 (작가명/이메일/작가ID)
* @param status 신청 상태 (PENDING/APPROVED/REJECTED/CANCELLED)
* @param sort 정렬 기준 (artistId/artistName/submittedAt/status)
* @param order 정렬 순서 (ASC/DESC)
* @param pageable 페이징 정보
* @return 입점 신청 목록
*/
@Query("""
SELECT a FROM ArtistApplication a
LEFT JOIN FETCH a.user u
WHERE (:keyword IS NULL OR
LOWER(a.artistName) LIKE LOWER(CONCAT('%', :keyword, '%')) OR
LOWER(u.email) LIKE LOWER(CONCAT('%', :keyword, '%')) OR
CAST(u.id AS string) LIKE CONCAT('%', :keyword, '%'))
AND (:status IS NULL OR a.status = :status)
ORDER BY
CASE WHEN :sort = 'artistId' AND :order = 'ASC' THEN u.id END ASC,
CASE WHEN :sort = 'artistId' AND :order = 'DESC' THEN u.id END DESC,
CASE WHEN :sort = 'artistName' AND :order = 'ASC' THEN a.artistName END ASC,
CASE WHEN :sort = 'artistName' AND :order = 'DESC' THEN a.artistName END DESC,
CASE WHEN :sort = 'submittedAt' AND :order = 'ASC' THEN a.createDate END ASC,
CASE WHEN :sort = 'submittedAt' AND :order = 'DESC' THEN a.createDate END DESC,
CASE WHEN :sort = 'status' AND :order = 'ASC' THEN a.status END ASC,
CASE WHEN :sort = 'status' AND :order = 'DESC' THEN a.status END DESC,
a.createDate DESC
""")
Page<ArtistApplication> findArtistApplicationsForAdmin(
@Param("keyword") String keyword,
@Param("status") ApplicationStatus status,
@Param("sort") String sort,
@Param("order") String order,
Pageable pageable
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ public class ArtistApplicationAdminService {
* TODO: 대시보드 파트와 겹치는 부분이어서 통합 고려
*/
public Page<ArtistApplicationSimpleResponse> getAllApplications(Pageable pageable) {
// 새로운 동적 쿼리 사용 (keyword, status null로 전체 조회, 기본 정렬: submittedAt DESC)
Page<ArtistApplication> applications =
artistApplicationRepository.findAllByOrderByCreateDateDesc(pageable);
artistApplicationRepository.findArtistApplicationsForAdmin(
null, // keyword: 검색어 없음 (전체 조회)
null, // status: 상태 필터 없음 (전체 조회)
"submittedAt", // 신청일자 기준 정렬
"DESC", // 최신순
pageable
);

return applications.map(ArtistApplicationSimpleResponse::from);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public record Application(
* 작가 정보
*/
public record Artist(
/** 회원 ID */
/** 작가 ID (User ID) */
Long artistId,
/** 회원 ID (이메일) */
String memberId,
/** 작가명 */
String name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,18 @@ public record AdminFundingApprovalResponse(
) {

/**
* 펀딩 승인 대기 정보
* 펀딩 승인 대기 정보 (화면 표시 필드만)
*/
public record FundingApproval(
/** 펀딩 ID */
Long fundingId,
/** 펀딩 제목 */
String title,
/** 작가 정보 */
Artist artist,
/** 목표 금액 */
long targetAmount,
/** 펀딩 시작일 */
String startDate,
/** 펀딩 종료일 */
String endDate,
/** 펀딩 신청일 */
String registeredAt,
/** 메인 이미지 */
String mainImage
) {}

/**
* 작가 정보
*/
public record Artist(
/** 작가 ID */
Long id,
Long artistId,
/** 작가명 */
String name,
/** 이메일 */
String email
String artistName,
/** 펀딩 제목 */
String title,
/** 신청일자 */
String registeredAt
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,80 +24,22 @@ public record AdminFundingResponse(
) {

/**
* 펀딩 정보
* 펀딩 정보 (화면 표시 필드만, 평면 구조)
*/
public record Funding(
/** 펀딩 ID */
/** 펀딩 ID (기본키) */
Long fundingId,
/** 작가 ID */
Long artistId,
/** 작가명 */
String artistName,
/** 펀딩 제목 */
String title,
/** 작가 정보 */
Artist artist,
/** 카테고리 정보 */
Category category,
/** 펀딩 상태 */
String status,
/** 목표 금액 */
long targetAmount,
/** 현재 금액 */
long currentAmount,
/** 달성률 (%) */
int achievementRate,
/** 후원자 수 */
int supporterCount,
/** 펀딩 상태 */
String status,
/** 마감일 */
String endDate,
/** 등록일 */
String registeredAt,
/** 남은 일수 */
int remainingDays,
/** 메인 이미지 */
String mainImage,
/** 권한 정보 */
Permissions permissions,
/** 플래그 정보 */
Flags flags
) {}

/**
* 작가 정보
*/
public record Artist(
/** 작가 ID */
Long id,
/** 회원 ID */
String memberId,
/** 작가명 */
String name
) {}

/**
* 카테고리 정보
*/
public record Category(
/** 카테고리 ID */
Long id,
/** 카테고리명 */
String name
) {}

/**
* 권한 정보
*/
public record Permissions(
/** 일시정지 가능 여부 */
boolean canPause,
/** 판매 전환 승인 가능 여부 */
boolean canApproveSale
) {}

/**
* 플래그 정보
*/
public record Flags(
/** 목표 달성 여부 */
boolean goalAchieved,
/** 마감 임박 여부 */
boolean dueSoon
String endDate
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,17 @@ public record AdminProductResponse(
* 상품 정보
*/
public record Product(
/** 상품 ID */
/** 상품 ID (기본키) */
Long productId,
/** 상품 번호 */
String productNumber,
/** 상품명 */
String name,
/** 작가 정보 */
Artist artist,
/** 작가명 */
String artistName,
/** 판매 상태 */
String sellingStatus,
/** 카테고리 정보 */
Category category,
/** 등록일 */
LocalDate registeredAt
) {}

/**
* 작가 정보
*/
public record Artist(
/** 작가 ID */
Long id,
/** 작가명 */
String name
) {}

/**
* 카테고리 정보
*/
public record Category(
/** 카테고리 ID */
Long id,
/** 카테고리명 */
String name
) {}
}
Loading