Skip to content

Commit

Permalink
Merge pull request #352 from 2022-bancow-teamProject/feature/kim-jihun
Browse files Browse the repository at this point in the history
[REFACTOR] Extract Json and Formatting
  • Loading branch information
kho903 authored Feb 13, 2022
2 parents ad1e556 + 5598789 commit fed8fea
Show file tree
Hide file tree
Showing 48 changed files with 112 additions and 184 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.bancow.bancowback.domain.common.util.mail.MailComponent;
import com.bancow.bancowback.domain.common.util.mail.entity.MailTemplate;
import com.bancow.bancowback.domain.common.util.mail.repository.MailTemplateRepository;
import com.bancow.bancowback.domain.common.util.token.repository.TokenRepository;
import com.bancow.bancowback.domain.common.util.token.service.TokenService;
import com.bancow.bancowback.domain.main.farmqna.dto.FarmQnaReplyDto;
import com.bancow.bancowback.domain.main.farmqna.entity.FarmQna;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.bancow.bancowback.domain.main.event.dto.EventInfo;
import com.bancow.bancowback.domain.main.event.dto.EventUpdateRequestDto;
import com.bancow.bancowback.domain.main.event.service.EventService;

import com.bancow.bancowback.infra.ncp.NcpService;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.bancow.bancowback.domain.common.dto.ServiceResult;
import com.bancow.bancowback.domain.common.exception.ErrorCode;
import com.bancow.bancowback.domain.common.exception.EventException;

import com.bancow.bancowback.domain.main.event.dto.EventAddRequestDto;
import com.bancow.bancowback.domain.main.event.dto.EventDistributeResponseDto;
import com.bancow.bancowback.domain.main.event.dto.EventInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.bancow.bancowback.domain.main.faq.controller;

import java.util.List;

import javax.validation.Valid;

import org.springframework.data.domain.Page;
Expand All @@ -22,7 +20,6 @@
import com.bancow.bancowback.domain.main.faq.dto.FaqDeleteListDto;
import com.bancow.bancowback.domain.main.faq.dto.FaqSearchResultDto;
import com.bancow.bancowback.domain.main.faq.dto.FaqUpdateDto;
import com.bancow.bancowback.domain.main.faq.entity.Faq;
import com.bancow.bancowback.domain.main.faq.service.FaqService;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.bancow.bancowback.domain.main.faq.dto;

import javax.persistence.Column;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class FaqDeleteListDto {

@JsonProperty("id_list")
private List<Long> idList;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@

import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

import com.bancow.bancowback.domain.main.faq.entity.FaqCategory;
import com.bancow.bancowback.domain.manager.entity.Manager;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.bancow.bancowback.domain.main.faq.dto;

import javax.persistence.Column;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import static com.bancow.bancowback.domain.common.exception.ErrorCode.*;

import java.util.ArrayList;
import java.util.List;

import org.mapstruct.Mapper;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
Expand All @@ -14,12 +12,12 @@
import com.bancow.bancowback.domain.common.dto.ServiceResult;
import com.bancow.bancowback.domain.common.exception.FaqException;
import com.bancow.bancowback.domain.common.util.token.service.TokenService;
import com.bancow.bancowback.domain.main.faq.dto.FaqSearchResultDto;
import com.bancow.bancowback.domain.main.faq.entity.Faq;
import com.bancow.bancowback.domain.main.faq.mapper.FaqMapper;
import com.bancow.bancowback.domain.main.faq.dto.FaqAddDto;
import com.bancow.bancowback.domain.main.faq.dto.FaqResponseDto;
import com.bancow.bancowback.domain.main.faq.dto.FaqSearchResultDto;
import com.bancow.bancowback.domain.main.faq.dto.FaqUpdateDto;
import com.bancow.bancowback.domain.main.faq.entity.Faq;
import com.bancow.bancowback.domain.main.faq.mapper.FaqMapper;
import com.bancow.bancowback.domain.main.faq.repository.FaqRepository;
import com.bancow.bancowback.domain.manager.entity.Manager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.bancow.bancowback.domain.main.farmqna.dto.FarmQnaDeleteRequestDto;
import com.bancow.bancowback.domain.main.farmqna.dto.FarmQnaReplyDto;
import com.bancow.bancowback.domain.main.farmqna.dto.FarmQnaResponseDto;
import com.bancow.bancowback.domain.main.farmqna.entity.FarmQna;
import com.bancow.bancowback.domain.main.farmqna.service.FarmQnaService;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.bancow.bancowback.domain.main.farmqna.dto;

import java.time.LocalDate;
import java.time.LocalDateTime;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static com.bancow.bancowback.domain.common.exception.ErrorCode.*;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.bancow.bancowback.domain.main.history.entity.History;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.springframework.web.bind.annotation.RestController;

import com.bancow.bancowback.domain.common.dto.Response;
import com.bancow.bancowback.domain.common.dto.ServiceResult;
import com.bancow.bancowback.domain.main.notice.dto.NoticeAddDto;
import com.bancow.bancowback.domain.main.notice.dto.NoticeDeleteListDto;
import com.bancow.bancowback.domain.main.notice.dto.NoticeUpdateDto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
package com.bancow.bancowback.domain.main.notice.dto;

import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.bancow.bancowback.domain.main.notice.entity.NoticeCategory;
import com.bancow.bancowback.domain.manager.entity.Manager;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class NoticeDeleteListDto {

@JsonProperty("id_list")
private List<Long> idList;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@
import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.bancow.bancowback.domain.main.notice.entity.NoticeCategory;
import com.bancow.bancowback.domain.manager.entity.Manager;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package com.bancow.bancowback.domain.main.notice.dto;

import java.time.LocalDateTime;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.bancow.bancowback.domain.main.notice.entity.NoticeCategory;
import com.bancow.bancowback.domain.manager.entity.Manager;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,13 @@

import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import com.bancow.bancowback.domain.main.notice.dto.NoticeAddDto;
import com.bancow.bancowback.domain.main.notice.dto.NoticeResponseDto;
import com.bancow.bancowback.domain.main.notice.dto.NoticeUpdateDto;
import com.bancow.bancowback.domain.main.notice.entity.Notice;
import com.bancow.bancowback.domain.main.notice.entity.NoticeCategory;
import com.bancow.bancowback.domain.manager.entity.Manager;

@Mapper(componentModel = "spring")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.bancow.bancowback.domain.main.notice.repository;

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

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.bancow.bancowback.domain.main.notice.entity.Notice;

public interface NoticeRepository extends JpaRepository<Notice, Long> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import static com.bancow.bancowback.domain.common.exception.ErrorCode.*;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
Expand All @@ -15,7 +13,6 @@
import com.bancow.bancowback.domain.common.exception.NoticeException;
import com.bancow.bancowback.domain.common.util.token.service.TokenService;
import com.bancow.bancowback.domain.main.notice.dto.NoticeAddDto;
import com.bancow.bancowback.domain.main.notice.dto.NoticeDeleteListDto;
import com.bancow.bancowback.domain.main.notice.dto.NoticeResponseDto;
import com.bancow.bancowback.domain.main.notice.dto.NoticeUpdateDto;
import com.bancow.bancowback.domain.main.notice.entity.Notice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

import com.bancow.bancowback.domain.common.dto.Response;
import com.bancow.bancowback.domain.common.dto.ServiceResult;
import com.bancow.bancowback.domain.manager.dto.ManagerResponseDto;
import com.bancow.bancowback.domain.manager.dto.ManagerFindDto;
import com.bancow.bancowback.domain.manager.dto.ManagerLoginDto;
import com.bancow.bancowback.domain.manager.dto.ManagerLoginResultDto;
import com.bancow.bancowback.domain.manager.dto.ManagerPasswordDto;
import com.bancow.bancowback.domain.manager.dto.ManagerRegisterDto;
import com.bancow.bancowback.domain.manager.dto.ManagerResponseDto;
import com.bancow.bancowback.domain.manager.service.ManagerService;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.springframework.web.bind.annotation.RestController;

import com.bancow.bancowback.domain.common.dto.Response;

import com.bancow.bancowback.domain.common.util.token.service.TokenService;
import com.bancow.bancowback.domain.sub.buyer.dto.BuyerDeleteRequestDto;
import com.bancow.bancowback.domain.sub.buyer.dto.BuyerUpdateRequestDto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.bancow.bancowback.domain.sub.chart.mapper;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;

import org.springframework.stereotype.Service;

import com.bancow.bancowback.domain.common.dto.ServiceResult;
import com.bancow.bancowback.domain.common.exception.ErrorCode;

import com.bancow.bancowback.domain.common.exception.FarmException;

import com.bancow.bancowback.domain.manager.entity.Manager;
import com.bancow.bancowback.domain.sub.farm.dto.FarmAddRequestDto;

import com.bancow.bancowback.domain.sub.farm.dto.FarmDetailResponseDto;
import com.bancow.bancowback.domain.sub.farm.dto.FarmDistributeResponseDto;
import com.bancow.bancowback.domain.sub.farm.dto.FarmPagingResponseDto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.bancow.bancowback.domain.sub.news.dto.NewsRequestDto;
import com.bancow.bancowback.domain.sub.news.dto.NewsResponseDto;
import com.bancow.bancowback.domain.sub.news.dto.NewsUpdateRequestDto;
import com.bancow.bancowback.domain.sub.news.entity.News;
import com.bancow.bancowback.domain.sub.news.service.NewsService;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.time.LocalDateTime;

import com.bancow.bancowback.domain.manager.entity.Manager;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AllArgsConstructor;
Expand Down
4 changes: 3 additions & 1 deletion spring/src/test/java/com/bancow/bancowback/TestSupport.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.bancow.bancowback;

import io.micrometer.core.instrument.util.IOUtils;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -24,6 +24,8 @@
import com.bancow.bancowback.domain.manager.repository.ManagerRepository;
import com.bancow.bancowback.domain.manager.service.ManagerService;

import io.micrometer.core.instrument.util.IOUtils;


@SpringBootTest
@AutoConfigureMockMvc
Expand Down
Loading

0 comments on commit fed8fea

Please sign in to comment.