Skip to content

Commit

Permalink
🔨 Refactor/#151 - core에 있는 domain, repository을 event로 이동 (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkyeomjang authored Nov 23, 2024
1 parent a9cc3f9 commit e651f8d
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.daon.onjung.core.utility.BankUtil;
import com.daon.onjung.core.utility.DateTimeUtil;
import com.daon.onjung.core.utility.RestClientUtil;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import com.daon.onjung.event.domain.service.EventService;
import com.daon.onjung.event.repository.mysql.EventRepository;
import lombok.RequiredArgsConstructor;
Expand All @@ -21,7 +21,6 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/daon/onjung/account/domain/Store.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.daon.onjung.account.domain.type.ECategory;
import com.daon.onjung.account.domain.type.EOnjungTag;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.daon.onjung.core.listener;

import com.daon.onjung.core.domain.ScheduledEventJob;
import com.daon.onjung.event.domain.redis.ScheduledEventJob;
import com.daon.onjung.core.exception.error.ErrorCode;
import com.daon.onjung.core.exception.type.CommonException;
import com.daon.onjung.core.repository.redis.ScheduledEventJobRepository;
import com.daon.onjung.event.repository.redis.ScheduledEventJobRepository;
import com.daon.onjung.event.application.controller.consumer.EventSchedulerConsumerV1Controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.daon.onjung.core.listener;

import com.daon.onjung.core.domain.ScheduledEventJob;
import com.daon.onjung.core.repository.redis.ScheduledEventJobRepository;
import com.daon.onjung.event.domain.redis.ScheduledEventJob;
import com.daon.onjung.event.repository.redis.ScheduledEventJobRepository;
import com.daon.onjung.event.application.controller.consumer.EventSchedulerConsumerV1Controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.daon.onjung.event.application.controller.consumer;

import com.daon.onjung.core.repository.redis.ScheduledEventJobRepository;
import com.daon.onjung.event.repository.redis.ScheduledEventJobRepository;
import com.daon.onjung.event.application.usecase.ProcessCompletedEventUseCase;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.daon.onjung.account.domain.Store;
import com.daon.onjung.core.dto.SelfValidating;
import com.daon.onjung.core.utility.DateTimeUtil;
import com.daon.onjung.event.domain.Ticket;
import com.daon.onjung.event.domain.mysql.Ticket;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.daon.onjung.account.domain.User;
import com.daon.onjung.account.domain.type.EBankName;
import com.daon.onjung.account.repository.mysql.UserRepository;
import com.daon.onjung.core.domain.service.ScheduledEventJobService;
import com.daon.onjung.event.domain.service.ScheduledEventJobService;
import com.daon.onjung.core.dto.CreateVirtualAccountResponseDto;
import com.daon.onjung.core.exception.error.ErrorCode;
import com.daon.onjung.core.exception.type.CommonException;
Expand All @@ -13,8 +13,8 @@
import com.daon.onjung.core.utility.FirebaseUtil;
import com.daon.onjung.core.utility.RestClientUtil;
import com.daon.onjung.event.application.usecase.ProcessCompletedEventUseCase;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.Ticket;
import com.daon.onjung.event.domain.mysql.Event;
import com.daon.onjung.event.domain.mysql.Ticket;
import com.daon.onjung.event.domain.service.EventService;
import com.daon.onjung.event.domain.service.TicketService;
import com.daon.onjung.event.repository.mysql.EventRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.daon.onjung.core.utility.DateTimeUtil;
import com.daon.onjung.event.application.dto.response.ReadOnjungEventOverviewResponseDto;
import com.daon.onjung.event.application.usecase.ReadOnjungEventOverviewUseCase;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import com.daon.onjung.event.domain.type.EStatus;
import com.daon.onjung.event.repository.mysql.EventRepository;
import com.daon.onjung.onjung.domain.Donation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.daon.onjung.core.exception.type.CommonException;
import com.daon.onjung.event.application.dto.response.ReadTicketResponseDto;
import com.daon.onjung.event.application.usecase.ReadTicketUseCase;
import com.daon.onjung.event.domain.Ticket;
import com.daon.onjung.event.domain.mysql.Ticket;
import com.daon.onjung.event.repository.mysql.TicketRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
import com.daon.onjung.event.application.dto.request.ReadTicketValidateRequestDto;
import com.daon.onjung.event.application.dto.response.ReadTicketValidateResponseDto;
import com.daon.onjung.event.application.usecase.ReadTicketValidateUseCase;
import com.daon.onjung.event.domain.Ticket;
import com.daon.onjung.event.domain.mysql.Ticket;
import com.daon.onjung.event.domain.service.TicketService;
import com.daon.onjung.event.repository.mysql.TicketRepository;
import com.daon.onjung.security.domain.mysql.Account;
import com.daon.onjung.security.repository.mysql.AccountRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.daon.onjung.event.domain;
package com.daon.onjung.event.domain.mysql;

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.account.domain.type.EBankName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.daon.onjung.event.domain;
package com.daon.onjung.event.domain.mysql;

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.account.domain.User;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.daon.onjung.core.domain;
package com.daon.onjung.event.domain.redis;

import lombok.AccessLevel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.account.domain.type.EBankName;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.type.EStatus;
import com.daon.onjung.event.domain.mysql.Event;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.daon.onjung.core.domain.service;
package com.daon.onjung.event.domain.service;

import com.daon.onjung.core.domain.ScheduledEventJob;
import com.daon.onjung.event.domain.redis.ScheduledEventJob;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.account.domain.User;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.Ticket;
import com.daon.onjung.event.domain.mysql.Event;
import com.daon.onjung.event.domain.mysql.Ticket;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.daon.onjung.event.repository.mysql;

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.daon.onjung.event.repository.mysql;

import com.daon.onjung.account.domain.User;
import com.daon.onjung.event.domain.Ticket;
import com.daon.onjung.event.domain.mysql.Ticket;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface TicketRepository extends JpaRepository<Ticket, Long> {

// user로 Ticket 조회, expirationDate를 ASC로 정렬
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.daon.onjung.core.repository.redis;
package com.daon.onjung.event.repository.redis;

import com.daon.onjung.core.domain.ScheduledEventJob;
import com.daon.onjung.event.domain.redis.ScheduledEventJob;
import org.jetbrains.annotations.NotNull;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.account.domain.User;
import com.daon.onjung.account.domain.type.EBankName;
import com.daon.onjung.account.repository.mysql.StoreRepository;
import com.daon.onjung.account.repository.mysql.UserRepository;
import com.daon.onjung.core.dto.CreateVirtualAccountResponseDto;
import com.daon.onjung.core.dto.DepositOrTransferVirtualAccountResponseDto;
import com.daon.onjung.core.exception.error.ErrorCode;
import com.daon.onjung.core.exception.type.CommonException;
import com.daon.onjung.core.utility.BankUtil;
import com.daon.onjung.core.utility.RestClientUtil;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import com.daon.onjung.event.repository.mysql.EventRepository;
import com.daon.onjung.onjung.application.dto.request.CreateDonationRequestDto;
import com.daon.onjung.onjung.application.dto.response.CreateDonationResponseDto;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/daon/onjung/onjung/domain/Donation.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.account.domain.User;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.daon.onjung.account.domain.Store;
import com.daon.onjung.account.domain.User;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import com.daon.onjung.onjung.domain.Donation;
import org.springframework.stereotype.Service;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import com.daon.onjung.account.domain.type.EBankName;
import com.daon.onjung.account.repository.mysql.OwnerRepository;
import com.daon.onjung.account.repository.mysql.StoreRepository;
import com.daon.onjung.core.domain.service.ScheduledEventJobService;
import com.daon.onjung.event.domain.service.ScheduledEventJobService;
import com.daon.onjung.core.dto.CreateVirtualAccountResponseDto;
import com.daon.onjung.core.utility.BankUtil;
import com.daon.onjung.core.utility.RestClientUtil;
import com.daon.onjung.core.utility.S3Util;
import com.daon.onjung.event.domain.Event;
import com.daon.onjung.event.domain.mysql.Event;
import com.daon.onjung.event.domain.service.EventService;
import com.daon.onjung.event.repository.mysql.EventRepository;
import com.daon.onjung.security.application.dto.request.SignUpOwnerByDefaultRequestDto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.daon.onjung.security.repository.mysql;

import com.daon.onjung.event.domain.Ticket;
import com.daon.onjung.event.domain.mysql.Ticket;
import com.daon.onjung.security.domain.mysql.Account;
import com.daon.onjung.security.domain.type.ESecurityProvider;
import io.lettuce.core.dynamic.annotation.Param;
Expand Down

0 comments on commit e651f8d

Please sign in to comment.