|
|
@@ -1,8 +1,8 @@
|
|
|
package com.example.cinema.blImpl.management;
|
|
|
|
|
|
+import com.example.cinema.bl.management.HallService;
|
|
|
+import com.example.cinema.bl.management.MovieService;
|
|
|
import com.example.cinema.bl.management.ScheduleService;
|
|
|
-import com.example.cinema.data.management.HallMapper;
|
|
|
-import com.example.cinema.data.management.MovieMapper;
|
|
|
import com.example.cinema.data.management.ScheduleMapper;
|
|
|
import com.example.cinema.vo.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -33,9 +33,10 @@ public class ScheduleServiceImpl implements ScheduleService {
|
|
|
@Autowired
|
|
|
private ScheduleMapper scheduleMapper;
|
|
|
@Autowired
|
|
|
- private MovieMapper movieMapper;
|
|
|
+ private MovieService movieService;
|
|
|
@Autowired
|
|
|
- private HallMapper hallMapper;
|
|
|
+ private HallService hallService;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public ResponseVO addSchedule(ScheduleForm scheduleForm) {
|
|
|
@@ -219,12 +220,12 @@ public class ScheduleServiceImpl implements ScheduleService {
|
|
|
}
|
|
|
|
|
|
//检查影厅是否存在
|
|
|
- if(hallMapper.selectHallById(scheduleForm.getHallId()) == null){
|
|
|
+ if(hallService.getHallById(scheduleForm.getHallId()) == null){
|
|
|
return ResponseVO.buildFailure(HALL_NOT_EXIST_ERROR_MESSAGE);
|
|
|
}
|
|
|
|
|
|
// 检查电影是否存在
|
|
|
- MovieVO movieVO = movieMapper.selectMovieById(scheduleForm.getMovieId());
|
|
|
+ MovieVO movieVO = movieService.getMovieById(scheduleForm.getMovieId());
|
|
|
if(movieVO == null){
|
|
|
return ResponseVO.buildFailure(MOVIE_NOT_EXIST_ERROR_MESSAGE);
|
|
|
}
|