Skip to content

Commit

Permalink
fix : 더미데이터 순서 변경 ( 대출, 현금, 사회서비스 -> 현금, 대출, 사회서비스 )
Browse files Browse the repository at this point in the history
  • Loading branch information
LHS-11 committed Feb 4, 2024
1 parent 93d4f1d commit f0eb6a6
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,34 +218,15 @@ public PolicyCountResponseDto getRecommendCountAndNickname(User user) {
}

public RecommendPolicyInfoResponseDto getRecommendPolicyDummy() {
Policy loansPolicy = policyRepository.findAllBySupportPolicyTypesContains(SupportPolicyType.LOANS).get(0);
Policy moneyPolicy = policyRepository.findAllBySupportPolicyTypesContains(SupportPolicyType.MONEY).get(0);
Policy loansPolicy = policyRepository.findAllBySupportPolicyTypesContains(SupportPolicyType.LOANS).get(0);
Policy socialServicePolicy = policyRepository.findAllBySupportPolicyTypesContains(SupportPolicyType.SOCIAL_SERVICE).get(0);

PolicyMethodType loansPolicyMethodType = PolicyMethodType.findPolicyMethodTypeByKeywords(loansPolicy.getApplicationProcedureContent());
PolicyMethodType moneyPolicyMethodType = PolicyMethodType.findPolicyMethodTypeByKeywords(moneyPolicy.getApplicationProcedureContent());
PolicyMethodType socialServicePolicyMethodType = PolicyMethodType.findPolicyMethodTypeByKeywords(socialServicePolicy.getApplicationProcedureContent());

List<RecommendPolicyInfoResponseDto.recommendPolicyInfo> result = new ArrayList<>();
result.add(
RecommendPolicyInfoResponseDto.recommendPolicyInfo.builder()
.supportTypeDescription(SupportPolicyType.LOANS.getDescription())
.supportType(SupportPolicyType.LOANS)
.policyId(loansPolicy.getId())
.policyName(loansPolicy.getPolicyName())
.policyLogo(loansPolicy.getPolicyLogo())
.policyAreaCode(loansPolicy.getAreaCode().getName())
.policyCityCode(loansPolicy.getAreaCode().getCities().size() != 0 ? loansPolicy.getCityCode().getName() : null)
.policyIntroduction(loansPolicy.getPolicyIntroduction())
.supportTypePolicyCnt(policyRepository.getPolicyCntBySupportPolicyType(SupportPolicyType.LOANS))
.benefit(10000000)
.applyFlag(false)
.interestFlag(false)
.policyDateType("기간 신청")
.policyMethodType(loansPolicyMethodType)
.policyMethodTypeDescription(loansPolicyMethodType.getDescription())
.build()
);
result.add(
RecommendPolicyInfoResponseDto.recommendPolicyInfo.builder()
.supportType(SupportPolicyType.MONEY)
Expand All @@ -265,6 +246,25 @@ public RecommendPolicyInfoResponseDto getRecommendPolicyDummy() {
.policyMethodTypeDescription(moneyPolicyMethodType.getDescription())
.build()
);
result.add(
RecommendPolicyInfoResponseDto.recommendPolicyInfo.builder()
.supportTypeDescription(SupportPolicyType.LOANS.getDescription())
.supportType(SupportPolicyType.LOANS)
.policyId(loansPolicy.getId())
.policyName(loansPolicy.getPolicyName())
.policyLogo(loansPolicy.getPolicyLogo())
.policyAreaCode(loansPolicy.getAreaCode().getName())
.policyCityCode(loansPolicy.getAreaCode().getCities().size() != 0 ? loansPolicy.getCityCode().getName() : null)
.policyIntroduction(loansPolicy.getPolicyIntroduction())
.supportTypePolicyCnt(policyRepository.getPolicyCntBySupportPolicyType(SupportPolicyType.LOANS))
.benefit(10000000)
.applyFlag(false)
.interestFlag(false)
.policyDateType("기간 신청")
.policyMethodType(loansPolicyMethodType)
.policyMethodTypeDescription(loansPolicyMethodType.getDescription())
.build()
);
result.add(
RecommendPolicyInfoResponseDto.recommendPolicyInfo.builder()
.supportType(SupportPolicyType.SOCIAL_SERVICE)
Expand Down

0 comments on commit f0eb6a6

Please sign in to comment.