Files
fuintback/fuint-application/src/main/java/com/fuint/common/service/BookService.java

92 lines
2.2 KiB
Java
Raw Normal View History

2026-01-27 14:03:02 +08:00
package com.fuint.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.common.dto.BookDto;
import com.fuint.common.param.BookPage;
import com.fuint.common.param.BookableParam;
import com.fuint.framework.exception.BusinessCheckException;
import com.fuint.framework.pagination.PaginationResponse;
import com.fuint.repository.model.MtBook;
2026-02-10 14:54:32 +08:00
import com.fuint.repository.model.MtBookItem;
2026-01-27 14:03:02 +08:00
import java.text.ParseException;
import java.util.List;
2026-02-10 14:54:32 +08:00
import java.util.Map;
2026-01-27 14:03:02 +08:00
/**
* 预约业务接口
*
* Created by FSQ
* CopyRight https://www.fuint.cn
*/
public interface BookService extends IService<MtBook> {
/**
* 分页查询预约列表
*
* @param bookPage
* @return
*/
PaginationResponse<BookDto> queryBookListByPagination(BookPage bookPage) throws BusinessCheckException;
/**
* 添加预约
*
* @param mtBook
* @throws BusinessCheckException
* @return
*/
MtBook addBook(MtBook mtBook) throws BusinessCheckException;
/**
* 根据ID获取预约项目信息
*
* @param id 预约项目ID
* @param fillDate 填充日期
* @throws BusinessCheckException
* @return
*/
BookDto getBookById(Integer id, boolean fillDate) throws ParseException;
/**
* 更新预约项目
*
* @param mtBook
* @throws BusinessCheckException
* @return
* */
MtBook updateBook(MtBook mtBook) throws BusinessCheckException;
/**
* 是否可预约
*
* @param param
* @throws BusinessCheckException
* @return
* */
List<String> isBookable(BookableParam param) throws BusinessCheckException, ParseException;
2026-02-10 14:54:32 +08:00
/**
* 获取可预约时段剩余名额
*/
List<Map<String, Object>> getBookableRemain(BookableParam param) throws BusinessCheckException, ParseException;
2026-01-27 14:03:02 +08:00
/**
* 获取预约项目列表
*
* @param merchantId 商户ID
* @param storeId 店铺ID
* @return
* */
List<MtBook> getBookList(Integer merchantId, Integer storeId);
2026-02-10 14:54:32 +08:00
/**
* 计算预约应付金额
*
* @param bookItem 预约记录
* @return
*/
java.math.BigDecimal calculateBookingPayAmount(MtBookItem bookItem) throws BusinessCheckException;
2026-01-27 14:03:02 +08:00
}