You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
banban/src/main/java/com/service/IScheduleService.java

116 lines
4.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.service;
import java.util.List;
import com.entity.Schedule;
import com.github.pagehelper.PageInfo;
/**
* IScheduleService 是排片服务层的接口,定义了与排片相关的业务逻辑操作。
*/
public interface IScheduleService {
/**
* 根据排片 ID 查询单个排片信息。
*
* @param schedule_id 要查询的排片 ID
* @return 返回包含排片信息的 Schedule 实体对象;如果未找到,则返回 null
*/
Schedule findScheduleById(long schedule_id);
/**
* 添加新的排片信息到数据库。
*
* @param schedule 包含要添加的排片信息的 Schedule 实体对象
* @return 如果插入成功返回受影响的行数通常为1否则返回0
*/
Integer addSchedule(Schedule schedule);
/**
* 更新指定 ID 的排片信息。
*
* @param schedule 包含更新信息的 Schedule 实体对象
* @return 如果更新成功返回受影响的行数通常为1否则返回0
*/
Integer updateSchedule(Schedule schedule);
/**
* 从数据库中删除指定 ID 的排片信息(实际是将排片下架,并非物理删除)。
*
* @param schedule_id 要下架的排片 ID
* @return 如果删除成功返回受影响的行数通常为1否则返回0
*/
Integer deleteSchedule(long schedule_id);
/**
* 增加指定排片的剩余座位数。
*
* @param schedule_id 要增加剩余座位数的排片 ID
* @return 如果更新成功返回受影响的行数通常为1否则返回0
*/
Integer addScheduleRemain(long schedule_id);
/**
* 减少指定排片的剩余座位数。
*
* @param schedule_id 要减少剩余座位数的排片 ID
* @return 如果更新成功返回受影响的行数通常为1否则返回0
*/
Integer delScheduleRemain(long schedule_id);
/**
* 分页查询符合条件的排片信息(根据电影名称),并加载关联的影厅、影院、电影和订单列表。
*
* @param page 当前页码
* @param limit 每页显示的记录数
* @param movie_name 电影名称
* @return 返回包含分页信息和排片列表的 PageInfo 对象
*/
PageInfo<Schedule> findScheduleByMovieName(Integer page, Integer limit, String movie_name);
/**
* 分页查询已下架的排片信息(根据电影名称),并加载关联的影厅、影院、电影和订单列表。
*
* @param page 当前页码
* @param limit 每页显示的记录数
* @param movie_name 电影名称
* @return 返回包含分页信息和排片列表的 PageInfo 对象
*/
PageInfo<Schedule> findOffScheduleByMovieName(Integer page, Integer limit, String movie_name);
/**
* 分页查询所有排片信息,并加载关联的影厅、影院、电影和订单列表。
*
* @param page 当前页码
* @param limit 每页显示的记录数
* @return 返回包含分页信息和排片列表的 PageInfo 对象
*/
PageInfo<Schedule> findAllSchedule(Integer page, Integer limit);
/**
* 分页查询符合条件的排片信息(根据排片状态),并加载关联的影厅、影院、电影和订单列表。
*
* @param page 当前页码
* @param limit 每页显示的记录数
* @param schedule_state 排片状态码
* @return 返回包含分页信息和排片列表的 PageInfo 对象
*/
PageInfo<Schedule> findAllScheduleByState(Integer page, Integer limit, int schedule_state);
/**
* 根据影院 ID 和电影 ID 查询符合条件的排片信息。
*
* @param cinema_id 影院 ID
* @param movie_id 电影 ID
* @return 返回符合条件的 Schedule 实体对象列表
*/
List<Schedule> findScheduleByCinemaAndMovie(long cinema_id, long movie_id);
/**
* 为 selectSeat 页面提供接口,根据影院 ID 和电影 ID 查询符合条件的排片信息,并加载关联的影厅、影院和电影。
*
* @param cinema_id 影院 ID
* @param movie_id 电影 ID
* @return 返回符合条件的 Schedule 实体对象列表
*/
List<Schedule> findScheduleByCineamIdAndMovieId(long cinema_id, long movie_id);
}