diff --git a/src/main/java/wowmarket/wow_server/demand/dto/DemandDto.java b/src/main/java/wowmarket/wow_server/demand/dto/DemandDto.java index 0ac891e..789360e 100644 --- a/src/main/java/wowmarket/wow_server/demand/dto/DemandDto.java +++ b/src/main/java/wowmarket/wow_server/demand/dto/DemandDto.java @@ -4,29 +4,26 @@ import lombok.NoArgsConstructor; import wowmarket.wow_server.domain.DemandProject; -import java.time.LocalDate; import java.time.LocalDateTime; @Getter @NoArgsConstructor public class DemandDto { - private Long project_id; - private String project_name; - private String seller_name; - private LocalDateTime start_date; - private LocalDateTime end_date; + private Long projectId; + private String sellerName; + private String projectName; + private LocalDateTime endDate; private String thumbnail; private int achieved; //달성률 분자: 모든 주문상세의 '주문개수' 컬럼의 합 private int goal; //달성률 분모: 상품 테이블에서 프로젝트 번호로 조회하여 해당 프로젝트에 들어있는 상품의 목표치의 합 - public DemandDto(DemandProject demandProject, int demandProject_total_count, int demandProject_total_goal) { - this.project_id = demandProject.getId(); - this.project_name = demandProject.getProjectName(); - this.seller_name = demandProject.getSellerName(); - this.start_date = demandProject.getStartDate(); - this.end_date = demandProject.getEndDate(); + public DemandDto(DemandProject demandProject, int demandProjectTotalCount, int demandProjectTotalGoal) { + this.projectId = demandProject.getId(); + this.sellerName = demandProject.getSellerName(); + this.projectName = demandProject.getProjectName(); + this.endDate = demandProject.getEndDate(); this.thumbnail = demandProject.getThumbnail(); - this.achieved = demandProject_total_count; - this.goal = demandProject_total_goal; + this.achieved = demandProjectTotalCount; + this.goal = demandProjectTotalGoal; } } diff --git a/src/main/java/wowmarket/wow_server/demand/dto/DemandResponseDto.java b/src/main/java/wowmarket/wow_server/demand/dto/DemandResponseDto.java index a0f7aa6..cef1f1e 100644 --- a/src/main/java/wowmarket/wow_server/demand/dto/DemandResponseDto.java +++ b/src/main/java/wowmarket/wow_server/demand/dto/DemandResponseDto.java @@ -2,22 +2,21 @@ import lombok.Getter; import lombok.NoArgsConstructor; -import wowmarket.wow_server.sale.dto.SaleDto; import java.util.List; @NoArgsConstructor @Getter public class DemandResponseDto { - private String univ; - private int total_page; - private int current_page; - private List project_list; + private String userUniv; + private int totalPage; + private int currentPage; + private List projectList; - public DemandResponseDto(String univ, int total_page, int current_page, List newDtos) { - this.univ = univ; - this.total_page = total_page; - this.current_page = current_page; - this.project_list = newDtos; + public DemandResponseDto(String univ, int totalPage, int currentPage, List newDtos) { + this.userUniv = univ; + this.totalPage = totalPage; + this.currentPage = currentPage; + this.projectList = newDtos; } } diff --git a/src/main/java/wowmarket/wow_server/demand/service/DemandHomeService.java b/src/main/java/wowmarket/wow_server/demand/service/DemandHomeService.java index 1e7c0bb..d43d05c 100644 --- a/src/main/java/wowmarket/wow_server/demand/service/DemandHomeService.java +++ b/src/main/java/wowmarket/wow_server/demand/service/DemandHomeService.java @@ -14,9 +14,8 @@ import wowmarket.wow_server.domain.User; import wowmarket.wow_server.repository.DemandItemRepository; import wowmarket.wow_server.repository.DemandProjectRepository; -import wowmarket.wow_server.repository.UserRepository; -import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.ZoneId; import java.util.ArrayList; @@ -26,32 +25,31 @@ public class DemandHomeService { private final DemandProjectRepository demandProjectRepository; private final DemandItemRepository demandItemRepository; - private final UserRepository userRepository; public DemandResponseDto findDemandProjectHome(Pageable pageable, String univ, User user) { - String user_univ = "allUniv"; - boolean user_univ_check = false; - LocalDate current_date = LocalDate.now(ZoneId.of("Asia/Seoul")); + String userUniv = "allUniv"; + boolean userUnivCheck = false; + LocalDateTime currentDate = LocalDateTime.now(ZoneId.of("Asia/Seoul")); Page findDemandProjects = new PageImpl<>(new ArrayList<>(), pageable, 0); if (user != null) { - user_univ_check = user.isUniv_check(); - if (user_univ_check) { - user_univ = user.getUniv(); + userUnivCheck = user.isUniv_check(); + if (userUnivCheck) { + userUniv = user.getUniv(); } } if (univ.equals("myUniv")) { if (user == null) { // 로그인 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "로그인이 필요한 서비스입니다."); - } else if (user_univ_check) { // 학교인증 O -> 로그인 O - findDemandProjects = demandProjectRepository.findByUserUniv(current_date, user_univ, pageable); + } else if (userUnivCheck) { // 학교인증 O -> 로그인 O + findDemandProjects = demandProjectRepository.findByUserUniv(currentDate, userUniv, pageable); } else { // 학교인증 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "학교 인증이 필요한 서비스입니다."); } } else if (univ.equals("allUniv")) { - findDemandProjects = demandProjectRepository.findAllNotEnd(current_date, pageable); + findDemandProjects = demandProjectRepository.findAllNotEnd(currentDate, pageable); } else { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "올바른 필터링 값이 아닙니다."); } @@ -60,7 +58,7 @@ public DemandResponseDto findDemandProjectHome(Pageable pageable, String univ, U demandItemRepository.getTotalOrderCountByDemandProject(demandProject), demandItemRepository.getTotalGoalByDemandProject(demandProject))); - return new DemandResponseDto(user_univ, + return new DemandResponseDto(userUniv, demandProjectDtos.getTotalPages(), demandProjectDtos.getNumber(), demandProjectDtos.getContent()); diff --git a/src/main/java/wowmarket/wow_server/demand/service/DemandSearchService.java b/src/main/java/wowmarket/wow_server/demand/service/DemandSearchService.java index 637bbf6..4856e8d 100644 --- a/src/main/java/wowmarket/wow_server/demand/service/DemandSearchService.java +++ b/src/main/java/wowmarket/wow_server/demand/service/DemandSearchService.java @@ -14,9 +14,8 @@ import wowmarket.wow_server.domain.User; import wowmarket.wow_server.repository.DemandItemRepository; import wowmarket.wow_server.repository.DemandProjectRepository; -import wowmarket.wow_server.repository.UserRepository; -import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.ZoneId; import java.util.ArrayList; @@ -26,32 +25,31 @@ public class DemandSearchService { private final DemandProjectRepository demandProjectRepository; private final DemandItemRepository demandItemRepository; - private final UserRepository userRepository; public DemandResponseDto findDemandProjectSearch(String search, Pageable pageable, String univ, User user) { - String user_univ = "allUniv"; - boolean user_univ_check = false; - LocalDate current_date = LocalDate.now(ZoneId.of("Asia/Seoul")); + String userUniv = "allUniv"; + boolean userUnivCheck = false; + LocalDateTime currentDate = LocalDateTime.now(ZoneId.of("Asia/Seoul")); Page findDemandProjects = new PageImpl<>(new ArrayList<>(), pageable, 0); if (user != null) { - user_univ_check = user.isUniv_check(); - if (user_univ_check) { - user_univ = user.getUniv(); + userUnivCheck = user.isUniv_check(); + if (userUnivCheck) { + userUniv = user.getUniv(); } } if (univ.equals("myUniv")) { if (user == null) { // 로그인 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "로그인이 필요한 서비스입니다."); - } else if (user_univ_check) { // 학교인증 O -> 로그인 O - findDemandProjects = demandProjectRepository.findBySearchUserUniv(current_date, search, user_univ, pageable); + } else if (userUnivCheck) { // 학교인증 O -> 로그인 O + findDemandProjects = demandProjectRepository.findBySearchUserUniv(currentDate, search, userUniv, pageable); } else { // 학교인증 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "학교 인증이 필요한 서비스입니다."); } } else if (univ.equals("allUniv")) { - findDemandProjects = demandProjectRepository.findBySearch(current_date, search, pageable); + findDemandProjects = demandProjectRepository.findBySearch(currentDate, search, pageable); } else { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "올바른 필터링 값이 아닙니다."); } @@ -60,7 +58,7 @@ public DemandResponseDto findDemandProjectSearch(String search, Pageable pageabl demandItemRepository.getTotalOrderCountByDemandProject(demandProject), demandItemRepository.getTotalGoalByDemandProject(demandProject))); - return new DemandResponseDto(user_univ, + return new DemandResponseDto(userUniv, demandProjectDtos.getTotalPages(), demandProjectDtos.getNumber(), demandProjectDtos.getContent()); diff --git a/src/main/java/wowmarket/wow_server/repository/DemandProjectRepository.java b/src/main/java/wowmarket/wow_server/repository/DemandProjectRepository.java index 5f56238..51b5fd5 100644 --- a/src/main/java/wowmarket/wow_server/repository/DemandProjectRepository.java +++ b/src/main/java/wowmarket/wow_server/repository/DemandProjectRepository.java @@ -9,32 +9,32 @@ import org.springframework.transaction.annotation.Transactional; import wowmarket.wow_server.domain.DemandProject; -import java.time.LocalDate; +import java.time.LocalDateTime; public interface DemandProjectRepository extends JpaRepository { @Query("SELECT dp FROM DemandProject dp " + "WHERE dp.isEnd = false " + - "AND dp.startDate <= :current_date AND dp.endDate >= :current_date " + - "AND dp.user.univ = :user_univ") - Page findByUserUniv(@Param("current_date") LocalDate current_date, @Param("user_univ") String user_univ, Pageable pageable); + "AND dp.startDate <= :currentDate AND dp.endDate >= :currentDate " + + "AND dp.user.univ = :userUniv") + Page findByUserUniv(@Param("currentDate") LocalDateTime currentDate, @Param("userUniv") String userUniv, Pageable pageable); @Query("SELECT dp FROM DemandProject dp WHERE dp.isEnd = false " + - "AND dp.startDate <= :current_date AND dp.endDate >= :current_date") - Page findAllNotEnd(@Param("current_date") LocalDate current_date, Pageable pageable); + "AND dp.startDate <= :currentDate AND dp.endDate >= :currentDate") + Page findAllNotEnd(@Param("currentDate") LocalDateTime currentDate, Pageable pageable); @Query("SELECT dp FROM DemandProject dp " + "WHERE dp.isEnd = false " + - "AND dp.startDate <= :current_date AND dp.endDate >= :current_date " + + "AND dp.startDate <= :currentDate AND dp.endDate >= :currentDate " + "AND dp.projectName LIKE CONCAT('%', :search, '%') " + - "AND dp.user.univ = :user_univ") - Page findBySearchUserUniv(@Param("current_date") LocalDate current_date, @Param("search") String search, - @Param("user_univ") String user_univ, Pageable pageable); + "AND dp.user.univ = :userUniv") + Page findBySearchUserUniv(@Param("currentDate") LocalDateTime currentDate, @Param("search") String search, + @Param("userUniv") String userUniv, Pageable pageable); @Query("SELECT dp FROM DemandProject dp " + "WHERE dp.isEnd = false " + - "AND dp.startDate <= :current_date AND dp.endDate >= :current_date " + + "AND dp.startDate <= :currentDate AND dp.endDate >= :currentDate " + "AND dp.projectName LIKE CONCAT('%', :search, '%')") - Page findBySearch(@Param("current_date") LocalDate current_date, @Param("search") String search, Pageable pageable); + Page findBySearch(@Param("currentDate") LocalDateTime currentDate, @Param("search") String search, Pageable pageable); Page findDemandProjectByUser_Id(Long seller_id, Pageable pageable); diff --git a/src/main/java/wowmarket/wow_server/repository/ProjectRepository.java b/src/main/java/wowmarket/wow_server/repository/ProjectRepository.java index 02cfa04..746759a 100644 --- a/src/main/java/wowmarket/wow_server/repository/ProjectRepository.java +++ b/src/main/java/wowmarket/wow_server/repository/ProjectRepository.java @@ -6,37 +6,37 @@ import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import org.springframework.security.core.parameters.P; import org.springframework.transaction.annotation.Transactional; import wowmarket.wow_server.domain.Project; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.List; public interface ProjectRepository extends JpaRepository { @Query("SELECT p FROM Project p " + "WHERE p.isDel = false AND p.isEnd = false " + - "AND p.startDate <= :current_date AND p.endDate >= :current_date " + - "AND p.user.univ = :user_univ") - Page findByUserUniv(@Param("user_univ") String user_univ, @Param("current_date") LocalDate current_date, Pageable pageable); + "AND p.startDate <= :currentDate AND p.endDate >= :currentDate " + + "AND p.user.univ = :userUniv") + Page findByUserUniv(@Param("userUniv") String userUniv, @Param("currentDate") LocalDateTime currentDate, Pageable pageable); @Query("SELECT p FROM Project p WHERE p.isDel = false AND p.isEnd = false " + - "AND p.startDate <= :current_date AND p.endDate >= :current_date") - Page findAllNotDelNotEnd(@Param("current_date") LocalDate current_date, Pageable pageable); + "AND p.startDate <= :currentDate AND p.endDate >= :currentDate") + Page findAllNotDelNotEnd(@Param("currentDate") LocalDateTime currentDate, Pageable pageable); @Query("SELECT p FROM Project p " + "WHERE p.isDel = false AND p.isEnd = false " + - "AND p.startDate <= :current_date AND p.endDate >= :current_date " + + "AND p.startDate <= :currentDate AND p.endDate >= :currentDate " + "AND p.projectName LIKE CONCAT('%', :search, '%') " + - "AND p.user.univ = :user_univ") - Page findBySearchUserUniv(@Param("current_date") LocalDate current_date, @Param("search") String search, - @Param("user_univ") String user_univ, Pageable pageable); + "AND p.user.univ = :userUniv") + Page findBySearchUserUniv(@Param("currentDate") LocalDateTime currentDate, @Param("search") String search, + @Param("userUniv") String userUniv, Pageable pageable); @Query("SELECT p FROM Project p " + "WHERE p.isDel = false AND p.isEnd = false " + - "AND p.startDate <= :current_date AND p.endDate >= :current_date " + + "AND p.startDate <= :currentDate AND p.endDate >= :currentDate " + "AND p.projectName LIKE CONCAT('%', :search, '%')") - Page findBySearch(@Param("current_date") LocalDate current_date, @Param("search") String search, Pageable pageable); + Page findBySearch(@Param("currentDate") LocalDateTime currentDate, @Param("search") String search, Pageable pageable); Page findByUser_Id(Long sellerId, Pageable pageable); diff --git a/src/main/java/wowmarket/wow_server/sale/controller/SaleController.java b/src/main/java/wowmarket/wow_server/sale/controller/SaleController.java index aa324ad..9f31480 100644 --- a/src/main/java/wowmarket/wow_server/sale/controller/SaleController.java +++ b/src/main/java/wowmarket/wow_server/sale/controller/SaleController.java @@ -11,13 +11,6 @@ import wowmarket.wow_server.sale.service.SaleHomeService; import wowmarket.wow_server.sale.service.SaleSearchService; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.nio.charset.StandardCharsets; -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.TimeZone; - @RestController @RequestMapping("/sale") @RequiredArgsConstructor diff --git a/src/main/java/wowmarket/wow_server/sale/dto/SaleDto.java b/src/main/java/wowmarket/wow_server/sale/dto/SaleDto.java index 9cae084..79b9aae 100644 --- a/src/main/java/wowmarket/wow_server/sale/dto/SaleDto.java +++ b/src/main/java/wowmarket/wow_server/sale/dto/SaleDto.java @@ -4,29 +4,26 @@ import lombok.NoArgsConstructor; import wowmarket.wow_server.domain.Project; -import java.time.LocalDate; import java.time.LocalDateTime; @Getter @NoArgsConstructor public class SaleDto { - private Long project_id; - private String project_name; - private String seller_name; - private LocalDateTime start_date; - private LocalDateTime end_date; + private Long projectId; + private String sellerName; + private String projectName; + private LocalDateTime endDate; private String thumbnail; private int achieved; //달성률 분자: 모든 주문상세의 '주문개수' 컬럼의 합 private int goal; //달성률 분모: 상품 테이블에서 프로젝트 번호로 조회하여 해당 프로젝트에 들어있는 상품의 목표치의 합 - public SaleDto(Project project, int project_total_count, int project_total_goal) { - this.project_id = project.getId(); - this.project_name = project.getProjectName(); - this.seller_name = project.getSellerName(); - this.start_date = project.getStartDate(); - this.end_date = project.getEndDate(); + public SaleDto(Project project, int projectTotalCount, int projectTotalGoal) { + this.projectId = project.getId(); + this.sellerName = project.getSellerName(); + this.projectName = project.getProjectName(); + this.endDate = project.getEndDate(); this.thumbnail = project.getThumbnail(); - this.achieved = project_total_count; - this.goal = project_total_goal; + this.achieved = projectTotalCount; + this.goal = projectTotalGoal; } } diff --git a/src/main/java/wowmarket/wow_server/sale/dto/SaleResponseDto.java b/src/main/java/wowmarket/wow_server/sale/dto/SaleResponseDto.java index 61ab4d8..70d9cb5 100644 --- a/src/main/java/wowmarket/wow_server/sale/dto/SaleResponseDto.java +++ b/src/main/java/wowmarket/wow_server/sale/dto/SaleResponseDto.java @@ -8,15 +8,15 @@ @Getter @NoArgsConstructor public class SaleResponseDto { - private String univ; - private int total_page; - private int current_page; - private List project_list; + private String userUniv; + private int totalPage; + private int currentPage; + private List projectList; - public SaleResponseDto(String user_univ, int total_page, int current_page, List newDtos) { - this.univ = user_univ; - this.total_page = total_page; - this.current_page = current_page; - this.project_list = newDtos; + public SaleResponseDto(String userUniv, int totalPage, int currentPage, List newDtos) { + this.userUniv = userUniv; + this.totalPage = totalPage; + this.currentPage = currentPage; + this.projectList = newDtos; } } diff --git a/src/main/java/wowmarket/wow_server/sale/service/SaleHomeService.java b/src/main/java/wowmarket/wow_server/sale/service/SaleHomeService.java index f606d8d..77cb5b9 100644 --- a/src/main/java/wowmarket/wow_server/sale/service/SaleHomeService.java +++ b/src/main/java/wowmarket/wow_server/sale/service/SaleHomeService.java @@ -12,11 +12,10 @@ import wowmarket.wow_server.domain.User; import wowmarket.wow_server.repository.ItemRepository; import wowmarket.wow_server.repository.ProjectRepository; -import wowmarket.wow_server.repository.UserRepository; import wowmarket.wow_server.sale.dto.SaleResponseDto; import wowmarket.wow_server.sale.dto.SaleDto; -import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.ZoneId; import java.util.ArrayList; @@ -24,34 +23,33 @@ @RequiredArgsConstructor @Transactional(readOnly = true) public class SaleHomeService { - private final UserRepository userRepository; private final ProjectRepository projectRepository; private final ItemRepository itemRepository; public SaleResponseDto findProjectHome(Pageable pageable, String univ, User user) { - String user_univ = "allUniv"; - boolean user_univ_check = false; - LocalDate current_date = LocalDate.now(ZoneId.of("Asia/Seoul")); + String userUniv = "allUniv"; + boolean userUnivCheck = false; + LocalDateTime currentDate = LocalDateTime.now(ZoneId.of("Asia/Seoul")); Page findProjects = new PageImpl<>(new ArrayList<>(), pageable, 0); if (user != null) { // 로그인 O - user_univ_check = user.isUniv_check(); - if (user_univ_check) { - user_univ = user.getUniv(); + userUnivCheck = user.isUniv_check(); + if (userUnivCheck) { + userUniv = user.getUniv(); } } if (univ.equals("myUniv")) { if (user == null) { // 로그인 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "로그인이 필요한 서비스입니다."); - } else if (user_univ_check) { // 학교인증 O -> 로그인 O - findProjects = projectRepository.findByUserUniv(user_univ, current_date, pageable); + } else if (userUnivCheck) { // 학교인증 O -> 로그인 O + findProjects = projectRepository.findByUserUniv(userUniv, currentDate, pageable); } else { // 학교인증 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "학교 인증이 필요한 서비스입니다."); } } else if (univ.equals("allUniv")) { // univ.equals("allUniv") - findProjects = projectRepository.findAllNotDelNotEnd(current_date, pageable); + findProjects = projectRepository.findAllNotDelNotEnd(currentDate, pageable); } else { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "올바른 필터링 값이 아닙니다."); } @@ -60,7 +58,7 @@ public SaleResponseDto findProjectHome(Pageable pageable, String univ, User user itemRepository.getTotalOrderCountByProject(project), itemRepository.getTotalGoalByProject(project))); - return new SaleResponseDto(user_univ, + return new SaleResponseDto(userUniv, projectDtos.getTotalPages(), projectDtos.getNumber(), projectDtos.getContent()); } } \ No newline at end of file diff --git a/src/main/java/wowmarket/wow_server/sale/service/SaleSearchService.java b/src/main/java/wowmarket/wow_server/sale/service/SaleSearchService.java index 3d1dc31..a1f3626 100644 --- a/src/main/java/wowmarket/wow_server/sale/service/SaleSearchService.java +++ b/src/main/java/wowmarket/wow_server/sale/service/SaleSearchService.java @@ -12,11 +12,10 @@ import wowmarket.wow_server.domain.User; import wowmarket.wow_server.repository.ItemRepository; import wowmarket.wow_server.repository.ProjectRepository; -import wowmarket.wow_server.repository.UserRepository; import wowmarket.wow_server.sale.dto.SaleResponseDto; import wowmarket.wow_server.sale.dto.SaleDto; -import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.ZoneId; import java.util.ArrayList; @@ -24,34 +23,33 @@ @RequiredArgsConstructor @Transactional(readOnly = true) public class SaleSearchService { - private final UserRepository userRepository; private final ProjectRepository projectRepository; private final ItemRepository itemRepository; public SaleResponseDto findProjectHome(String search, Pageable pageable, String univ, User user) { - String user_univ = "allUniv"; - boolean user_univ_check = false; - LocalDate current_date = LocalDate.now(ZoneId.of("Asia/Seoul")); + String userUniv = "allUniv"; + boolean userUnivCheck = false; + LocalDateTime currentDate = LocalDateTime.now(ZoneId.of("Asia/Seoul")); Page findProjects = new PageImpl<>(new ArrayList<>(), pageable, 0); if (user != null) { - user_univ_check = user.isUniv_check(); - if (user_univ_check) { - user_univ = user.getUniv(); + userUnivCheck = user.isUniv_check(); + if (userUnivCheck) { + userUniv = user.getUniv(); } } if (univ.equals("myUniv")) { if (user == null) { // 로그인 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "로그인이 필요한 서비스입니다."); - } else if (user_univ_check) { // 학교인증 O -> 로그인 O - findProjects = projectRepository.findBySearchUserUniv(current_date, search, user_univ, pageable); + } else if (userUnivCheck) { // 학교인증 O -> 로그인 O + findProjects = projectRepository.findBySearchUserUniv(currentDate, search, userUniv, pageable); } else { // 학교인증 X throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "학교 인증이 필요한 서비스입니다."); } } else if (univ.equals("allUniv")) { - findProjects = projectRepository.findBySearch(current_date, search, pageable); + findProjects = projectRepository.findBySearch(currentDate, search, pageable); } else { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "올바른 필터링 값이 아닙니다."); } @@ -60,7 +58,7 @@ public SaleResponseDto findProjectHome(String search, Pageable pageable, String itemRepository.getTotalOrderCountByProject(project), itemRepository.getTotalGoalByProject(project))); - return new SaleResponseDto(user_univ, + return new SaleResponseDto(userUniv, projectDtos.getTotalPages(), projectDtos.getNumber(), projectDtos.getContent()); } }