File tree Expand file tree Collapse file tree 5 files changed +50
-2
lines changed
src/main/java/com/example/helper Expand file tree Collapse file tree 5 files changed +50
-2
lines changed Original file line number Diff line number Diff line change 11package com .example .helper .controller ;
2+ import com .example .helper .dto .DateMealDto ;
3+ import com .example .helper .dto .DateReqDto ;
24import com .example .helper .dto .Mealdto ;
35import com .example .helper .entity .Meal ;
6+ import com .example .helper .service .DateMealService ;
47import com .example .helper .service .MealService ;
58import com .fasterxml .jackson .core .JsonProcessingException ;
69import com .fasterxml .jackson .databind .ObjectMapper ;
@@ -23,6 +26,9 @@ public class MealController {
2326 @ Autowired
2427 private MealService mealService ;
2528
29+ @ Autowired
30+ private DateMealService dateMealService ;
31+
2632 @ GetMapping ("/all" )
2733 public String hello () {
2834 return "Hello HELPERs. 초기 세팅 완료." ;
@@ -231,7 +237,7 @@ public String readSpecEngMeal() throws JsonProcessingException {
231237 @ GetMapping ("/date" )
232238 public List <DateMealDto > DateMealRead (DateReqDto dateReqDto ) {
233239
234- List <DateMealDto > dateMealDtoList = mealService .getDateMeal (dateReqDto );
240+ List <DateMealDto > dateMealDtoList = dateMealService .getDateMeal (dateReqDto );
235241
236242 return dateMealDtoList ;
237243 }
Original file line number Diff line number Diff line change 1+ package com .example .helper .dto ;
2+
3+ import lombok .Data ;
4+
5+ @ Data
6+ public class DateMealDto {
7+ private String breakfast ;
8+ private String lunch_A ;
9+ private String dinner ;
10+ private String lunch_B ;
11+ }
Original file line number Diff line number Diff line change 1+ package com .example .helper .dto ;
2+
3+ import lombok .Data ;
4+
5+ @ Data
6+ public class DateReqDto {
7+ private String year ;
8+ private String month ;
9+ private String date ;
10+ private Integer langType ;
11+ private Integer bldgType ;
12+ }
Original file line number Diff line number Diff line change 1+ package com .example .helper .service ;
2+
3+ import com .example .helper .dto .DateMealDto ;
4+ import com .example .helper .dto .DateReqDto ;
5+ import java .util .List ;
6+ import org .springframework .stereotype .Service ;
7+ import org .springframework .transaction .annotation .Transactional ;
8+
9+ @ Service
10+ @ Transactional
11+ public class DateMealService {
12+ // TODO: exception handling(target data is not in DB)
13+
14+ public List <DateMealDto > getDateMeal (DateReqDto dateReqDto ) {
15+ return null ;
16+ }
17+ }
Original file line number Diff line number Diff line change 11package com .example .helper .service ;
22
3+ import com .example .helper .dto .DateMealDto ;
4+ import com .example .helper .dto .DateReqDto ;
35import com .example .helper .entity .Meal ;
46import com .example .helper .repository .MealRepository ;
57import com .example .helper .repository .SqlMealRepository ;
8+ import java .util .List ;
69import org .springframework .beans .factory .annotation .Autowired ;
710import org .springframework .stereotype .Service ;
811import org .springframework .transaction .annotation .Transactional ;
@@ -51,5 +54,4 @@ public String getSpecEngMeal() {
5154 //TODO sqlMealRepository.findSpecEngMeal
5255 return "2023-01-27 Breakfast\n \n Student Union Bldg.2 1st floor\n \n White rice*Seasoned rice with seaweed\n " ;
5356 }
54-
5557}
You can’t perform that action at this time.
0 commit comments