11package com .icd .survey .api .service .survey .business ;
22
3+ import com .icd .survey .api .entity .survey .ItemAnswer ;
34import com .icd .survey .api .entity .survey .ItemAnswerOption ;
45import com .icd .survey .api .entity .survey .Survey ;
56import com .icd .survey .api .entity .survey .SurveyItem ;
@@ -23,18 +24,23 @@ public class SurveyQueryBusiness {
2324 private final ItemAnswerRepository itemAnswerRepository ;
2425 private final AnswerOptionRepository answerOptionRepository ;
2526
27+
2628 public Optional <Survey > findSurveyById (Long surveySeq ) {
2729 return surveyRepository .findById (surveySeq );
2830 }
2931
30- public Optional <Survey > findUserSurvey ( String surveyName , String userSeq ) {
31- return surveyRepository . findBySurveyNameAndIpAddress ( surveyName , userSeq );
32+ public Optional <List < SurveyItem >> findAllItemInfoBySurveySeq ( Long surveySeq ) {
33+ return surveyItemRepository . findSurveyItemsWithAnswers ( surveySeq );
3234 }
3335
3436 public Optional <List <SurveyItem >> findItemAllBySurveySeq (Long surveySeq ) {
3537 return surveyItemRepository .findAllBySurveySeq (surveySeq );
3638 }
3739
40+ public Optional <List <ItemAnswer >> findAnswerListBySurveySeq (Long surveySeq ) {
41+ return null ;
42+ }
43+
3844 public Optional <List <ItemAnswerOption >> findOptionAllByItemSeq (Long itemSeq ) {
3945 return answerOptionRepository .findAllByItemSeq (itemSeq );
4046 }
@@ -51,8 +57,5 @@ public Optional<SurveyItem> findSurveyItemById(Long itemSeq) {
5157 return surveyItemRepository .findById (itemSeq );
5258 }
5359
54- public Optional <ItemAnswerOption > findAnswerOptionById (Long answerSeq ) {
55- return answerOptionRepository .findById (answerSeq );
56- }
5760
5861}
0 commit comments