Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
angelSuho committed Aug 14, 2024
2 parents 5fd37e0 + b7a1ba2 commit 51fee99
Show file tree
Hide file tree
Showing 71 changed files with 478 additions and 331 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.dduckddak.domain.data.controller;
package com.dduckddak.domain.data.facility.controller;


import com.dduckddak.domain.data.dto.FacilityByDistrictResponse;
import com.dduckddak.domain.data.dto.FacilityDto;
import com.dduckddak.domain.data.service.FacilityService;
import com.dduckddak.domain.data.facility.dto.FacilityByDistrictResponse;
import com.dduckddak.domain.data.facility.dto.FacilityDto;
import com.dduckddak.domain.data.facility.service.FacilityService;
import com.dduckddak.global.ApiResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.facility.dto;


import com.dduckddak.domain.data.model.Facility;
import com.querydsl.core.annotations.QueryProjection;
import lombok.Builder;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.facility.dto;


import com.dduckddak.domain.data.model.Facility;
import com.dduckddak.domain.data.facility.model.Facility;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@Builder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.model;
package com.dduckddak.domain.data.facility.model;

import com.dduckddak.domain.town.model.Town;
import jakarta.persistence.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.facility.repository;

import com.dduckddak.domain.data.model.Facility;
import com.dduckddak.domain.data.model.Sales;
import com.dduckddak.domain.data.facility.model.Facility;
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.facility.repository;

import com.dduckddak.domain.data.model.Facility;
import com.dduckddak.domain.data.model.Finance;
import com.dduckddak.domain.data.facility.model.Facility;
import org.springframework.data.jpa.repository.JpaRepository;

public interface FacilityRepository extends JpaRepository<Facility, Long>, FacilityRepositoryCustom {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.dduckddak.domain.data.facility.repository;

import com.dduckddak.domain.data.facility.dto.FacilityByDistrictResponse;
import com.dduckddak.domain.data.facility.model.Facility;

public interface FacilityRepositoryCustom {

Facility findByTownCodeAndQuarter(String code);

FacilityByDistrictResponse findRecentByDistrict(String district);
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.facility.repository;

import com.dduckddak.domain.data.dto.FacilityByDistrictResponse;
import com.dduckddak.domain.data.dto.QFacilityByDistrictResponse;
import com.dduckddak.domain.data.dto.QPopulationByDistrictResponse;
import com.dduckddak.domain.data.model.Facility;
import com.dduckddak.domain.data.model.Population;
import com.dduckddak.domain.data.model.PopulationType;
import com.dduckddak.domain.data.facility.dto.FacilityByDistrictResponse;
import com.dduckddak.domain.data.facility.dto.QFacilityByDistrictResponse;
import com.dduckddak.domain.data.facility.model.Facility;
import com.querydsl.core.types.dsl.Expressions;
import com.querydsl.jpa.impl.JPAQuery;
import com.querydsl.jpa.impl.JPAQueryFactory;
import lombok.RequiredArgsConstructor;

import java.util.List;

import static com.dduckddak.domain.data.model.QFacility.facility;
import static com.dduckddak.domain.data.model.QPopulation.population;
import static com.dduckddak.domain.data.facility.model.QFacility.facility;
import static com.dduckddak.domain.town.model.QTown.town;

@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.dduckddak.domain.data.service;
package com.dduckddak.domain.data.facility.service;

import com.dduckddak.domain.data.dto.FacilityByDistrictResponse;
import com.dduckddak.domain.data.dto.FacilityDto;
import com.dduckddak.domain.data.model.Facility;
import com.dduckddak.domain.data.repository.FacilityRepository;
import com.dduckddak.domain.data.facility.dto.FacilityByDistrictResponse;
import com.dduckddak.domain.data.facility.dto.FacilityDto;
import com.dduckddak.domain.data.facility.model.Facility;
import com.dduckddak.domain.data.facility.repository.FacilityRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.model;
package com.dduckddak.domain.data.finance.model;

import com.dduckddak.domain.town.model.Town;
import jakarta.persistence.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.finance.repository;


import com.dduckddak.domain.data.model.Finance;
import com.dduckddak.domain.data.model.Population;
import com.dduckddak.domain.data.finance.model.Finance;
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.finance.repository;

import com.dduckddak.domain.data.model.Finance;
import com.dduckddak.domain.data.finance.model.Finance;
import org.springframework.data.jpa.repository.JpaRepository;

public interface FinanceRepository extends JpaRepository<Finance, Long> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.markettrends.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.markettrends.dto;

import lombok.Builder;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.model;
package com.dduckddak.domain.data.markettrends.model;

import com.dduckddak.domain.town.model.Town;
import jakarta.persistence.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.markettrends.repository;

import com.dduckddak.domain.data.model.MarketTrends;
import com.dduckddak.domain.data.markettrends.model.MarketTrends;
import org.springframework.data.jpa.repository.JpaRepository;

public interface MarketTrendRepository extends JpaRepository<MarketTrends, Integer>, MarketTrendRepositoryCustom {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.markettrends.repository;

import com.dduckddak.domain.data.model.MarketTrends;
import com.dduckddak.domain.data.markettrends.model.MarketTrends;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.markettrends.repository;

import com.dduckddak.domain.data.model.MarketTrends;
import com.dduckddak.domain.data.markettrends.model.MarketTrends;
import com.querydsl.jpa.impl.JPAQueryFactory;
import jakarta.persistence.EntityManager;

import java.util.List;

import static com.dduckddak.domain.data.model.QMarketTrends.marketTrends;
import static com.dduckddak.domain.data.markettrends.model.QMarketTrends.marketTrends;

public class MarketTrendRepositoryImpl implements MarketTrendRepositoryCustom {
private final JPAQueryFactory queryFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.markettrends.repository;

import com.dduckddak.domain.data.model.Facility;
import com.dduckddak.domain.data.model.MarketTrends;
import com.dduckddak.domain.data.markettrends.model.MarketTrends;
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.dduckddak.domain.member.controller;
package com.dduckddak.domain.data.member.controller;

import com.dduckddak.domain.member.controller.dto.ScrapRequest;
import com.dduckddak.domain.member.controller.dto.ScrapResponse;
import com.dduckddak.domain.member.service.ScrapService;
import com.dduckddak.domain.data.member.controller.dto.ScrapRequest;
import com.dduckddak.domain.data.member.controller.dto.ScrapResponse;
import com.dduckddak.domain.data.member.service.ScrapService;
import com.dduckddak.global.ApiResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.member.controller.dto;
package com.dduckddak.domain.data.member.controller.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.member.controller.dto;
package com.dduckddak.domain.data.member.controller.dto;

import lombok.AccessLevel;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.member.model;
package com.dduckddak.domain.data.member.model;

import jakarta.persistence.*;
import lombok.AccessLevel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.member.model;
package com.dduckddak.domain.data.member.model;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dduckddak.domain.member.model;
package com.dduckddak.domain.data.member.model;

import com.dduckddak.domain.member.controller.dto.ScrapRequest;
import com.dduckddak.domain.data.member.controller.dto.ScrapRequest;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dduckddak.domain.member.repository;
package com.dduckddak.domain.data.member.repository;

import com.dduckddak.domain.member.model.Member;
import com.dduckddak.domain.data.member.model.Member;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dduckddak.domain.member.repository;
package com.dduckddak.domain.data.member.repository;

import com.dduckddak.domain.member.model.Scrap;
import com.dduckddak.domain.data.member.model.Scrap;
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,11 +1,11 @@
package com.dduckddak.domain.member.service;

import com.dduckddak.domain.member.controller.dto.ScrapRequest;
import com.dduckddak.domain.member.controller.dto.ScrapResponse;
import com.dduckddak.domain.member.model.Member;
import com.dduckddak.domain.member.model.Scrap;
import com.dduckddak.domain.member.repository.MemberRepository;
import com.dduckddak.domain.member.repository.ScrapRepository;
package com.dduckddak.domain.data.member.service;

import com.dduckddak.domain.data.member.repository.MemberRepository;
import com.dduckddak.domain.data.member.repository.ScrapRepository;
import com.dduckddak.domain.data.member.controller.dto.ScrapRequest;
import com.dduckddak.domain.data.member.controller.dto.ScrapResponse;
import com.dduckddak.domain.data.member.model.Member;
import com.dduckddak.domain.data.member.model.Scrap;
import com.dduckddak.domain.town.model.Town;
import com.dduckddak.domain.town.repository.TownRepository;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.dduckddak.domain.data.controller;
package com.dduckddak.domain.data.population.controller;

import com.dduckddak.domain.data.dto.*;
import com.dduckddak.domain.data.model.PopulationType;
import com.dduckddak.domain.data.service.PopulationService;
import com.dduckddak.domain.data.population.dto.*;
import com.dduckddak.domain.data.population.model.PopulationType;
import com.dduckddak.domain.data.population.service.PopulationService;
import com.dduckddak.global.ApiResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.population.dto;

import com.querydsl.core.annotations.QueryProjection;
import lombok.AccessLevel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.population.dto;

import com.dduckddak.domain.data.model.Population;
import com.dduckddak.domain.data.population.model.Population;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.dduckddak.domain.data.dto;

import com.dduckddak.domain.data.model.Population;
package com.dduckddak.domain.data.population.dto;

import java.util.List;

public record PopulationTransitionResponse(
List<PopulationData> populationList
) {
public record PopulationData(
String townName,
long quarter,
long populationOfTown,
int rankAtCity,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.population.dto;


import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.dduckddak.domain.data.dto;
package com.dduckddak.domain.data.population.dto;

import com.dduckddak.domain.data.model.Population;
import com.dduckddak.domain.data.population.model.Population;
import com.dduckddak.domain.data.sales.dto.RecentlySalesDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.dduckddak.domain.data.model;
package com.dduckddak.domain.data.population.model;

import com.dduckddak.domain.town.model.Town;
import com.dduckddak.domain.town.model.TownIndustry;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dduckddak.domain.data.model;
package com.dduckddak.domain.data.population.model;

import lombok.Getter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.dduckddak.domain.data.repository;
package com.dduckddak.domain.data.population.repository;

import com.dduckddak.domain.data.model.Population;
import com.dduckddak.domain.data.model.PopulationType;
import com.dduckddak.domain.data.population.model.Population;
import com.dduckddak.domain.data.population.model.PopulationType;
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.dduckddak.domain.data.population.repository;

import com.dduckddak.domain.data.population.model.Population;
import com.dduckddak.domain.data.population.model.PopulationType;
import com.dduckddak.domain.town.model.Town;
import org.springframework.data.jpa.repository.JpaRepository;

public interface PopulationRepository extends JpaRepository<Population, Long>, PopulationRepositoryCustom {

Population findByTownAndPopulationType(Town town, PopulationType populationType);





}
Loading

0 comments on commit 51fee99

Please sign in to comment.