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.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);

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

    //服务订单预约
    void reservation(PensionOrderDTO pensionOrderDTO);

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

    //根据用户ID或订单状态查询(带图)
    PensionOrderDTO getOrderInfoByIdAndUserIdOrStatus(Long orderId, Long userId, Integer status);

    //老人今日订单
    PageData<PensionOrderDTO> getElderTodayOrderPage(Map<String, Object> params, Long creator);

    //老人全部订单或根据订单状态查询
    PageData<PensionOrderDTO> getElderAllOrderOrByStatusPage(Map<String, Object> params, Long creator, Integer status);

}
