package io.hmit.modules.serviceOrder.service;

import io.hmit.common.page.PageData;
import io.hmit.common.service.CrudService;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.modules.serviceOrder.dto.ReservationDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;

import java.util.Map;

/**
 * 订单表
 *
 * @author zsh 408538940@qq.com
 * @since 1.0.0 2021-01-26
 */
public interface PensionOrderService extends CrudService<PensionOrderEntity, PensionOrderDTO> {

    //查询全部订单
    PageData<PensionOrderDTO> getAllOrderPage(Map<String, Object> params, Long userId);

    //查询今日订单
    PageData<PensionOrderDTO> getTodayOrderPage(Map<String, Object> params, Long userId);

    //查询未完成订单
    PageData<PensionOrderDTO> getIncompleteOrderPage(Map<String, Object> params, Long userId);

    //查询已接单订单
    PageData<PensionOrderDTO> getTakingOrderPage(Map<String, Object> params, Long userId);

    //查询已完成订单
    PageData<PensionOrderDTO> getFinishedOrderPage(Map<String, Object> params, Long userId);

    //查询已取消订单
    PageData<PensionOrderDTO> getCanceledOrderPage(Map<String, Object> params, Long userId);

    //查询未接单订单
    PageData<PensionOrderDTO> getNoProceedOrderPage(Map<String, Object> params);

    //查询预约订单详情
    PensionOrderDTO getOrderInfoByIdAndUserId(Long id, Long userId);

    //根据订单Id和订单状态查询
    PensionOrderDTO getOrderInfoByIdAndStatus(Long orderId, Integer status);

    void reservation(ReservationDTO reservationDTO);

    //查询已完成订单
    PageData<PensionOrderDTO> getOrderPageByStatus(Map<String, Object> params, Long userId, Integer status);

}
