|
|
@@ -2,6 +2,8 @@ package com.example.cinema.blImpl.management;
|
|
|
|
|
|
import com.example.cinema.bl.management.MovieService;
|
|
|
import com.example.cinema.bl.management.ScheduleService;
|
|
|
+import com.example.cinema.blImpl.management.schedule.MovieServiceForBl;
|
|
|
+import com.example.cinema.blImpl.management.schedule.ScheduleServiceForBl;
|
|
|
import com.example.cinema.data.statistics.MovieLikeMapper;
|
|
|
import com.example.cinema.data.management.MovieMapper;
|
|
|
import com.example.cinema.vo.*;
|
|
|
@@ -17,7 +19,7 @@ import java.util.List;
|
|
|
* @date 2019/3/12 6:43 PM
|
|
|
*/
|
|
|
@Service
|
|
|
-public class MovieServiceImpl implements MovieService {
|
|
|
+public class MovieServiceImpl implements MovieService, MovieServiceForBl {
|
|
|
|
|
|
private static final String ALREADY_LIKE_ERROR_MESSAGE = "用户已标记该电影为想看";
|
|
|
private static final String UNLIKE_ERROR_MESSAGE = "用户未标记该电影为想看";
|
|
|
@@ -29,7 +31,7 @@ public class MovieServiceImpl implements MovieService {
|
|
|
@Autowired
|
|
|
private MovieLikeMapper movieLikeMapper;
|
|
|
@Autowired
|
|
|
- private ScheduleService scheduleService;
|
|
|
+ private ScheduleServiceForBl scheduleServiceForBl;
|
|
|
|
|
|
@Override
|
|
|
public ResponseVO addMovie(MovieForm addMovieForm) {
|
|
|
@@ -118,8 +120,9 @@ public class MovieServiceImpl implements MovieService {
|
|
|
|
|
|
@Override
|
|
|
public ResponseVO getMovieByKeyword(String keyword) {
|
|
|
- if (keyword==null||keyword.equals(""))
|
|
|
+ if (keyword==null||keyword.equals("")){
|
|
|
return ResponseVO.buildSuccess(movieMapper.selectAllMovie());
|
|
|
+ }
|
|
|
return ResponseVO.buildSuccess(movieMapper.selectMovieByKeyword(keyword));
|
|
|
}
|
|
|
|
|
|
@@ -183,7 +186,7 @@ public class MovieServiceImpl implements MovieService {
|
|
|
*/
|
|
|
public ResponseVO preCheck(List<Integer> movieIdList){
|
|
|
Date thisTime = new Date();
|
|
|
- List<ScheduleItem> scheduleItems = scheduleService.getScheduleByMovieIdList(movieIdList);
|
|
|
+ List<ScheduleItem> scheduleItems = scheduleServiceForBl.getScheduleByMovieIdList(movieIdList);
|
|
|
|
|
|
// 检查是否有电影后续有排片及是否有观众购票未使用
|
|
|
for(ScheduleItem s : scheduleItems){
|