package io.hmit.modules.serviceOrder.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import io.hmit.common.dao.BaseDao;
import io.hmit.common.page.PageData;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 订单表
 *
 * @author zsh 408538940@qq.com
 * @since 1.0.0 2021-01-26
 */
@Mapper
public interface PensionOrderDao extends BaseDao<PensionOrderEntity> {

    /**
     * 志愿者：今日订单接单接口
     * @param page
     * @return
     */
    IPage<PensionOrderDTO> getTodayNoProceedOrderPage(IPage<PensionOrderEntity> page);

    PensionOrderEntity getOrderInfoByIdAndStatus(Long orderId, Integer status);

    IPage<PensionOrderDTO> getOrderPageByStatusOrUserId(IPage<PensionOrderEntity> page, Long userId, Integer status);

    PensionOrderDTO getOrderInfoByIdAndUserIdOrStatus(Long orderId, Long userId, Integer status);

    /**
     * 老人：今日订单
     * @param page
     * @param creator
     * @return
     */
    IPage<PensionOrderDTO> getElderTodayOrderPage(IPage<PensionOrderEntity> page, Long creator);

    /**
     * 老人：全部订单
     * @param params
     * @param creator
     * @return
     */
    List<PensionOrderDTO> getElderAllOrderOrByStatusList(Map<String, Object> params, Long creator, Integer status);


}
