/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.finance.service;

import org.springblade.modules.finance.entity.OrderGroupon;
import org.springblade.modules.finance.vo.OrderGrouponVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.groupon.vo.AppointmentVO;
import org.springblade.modules.groupon.vo.ExportAppointmentVO;
import org.springblade.modules.groupon.vo.ExportPickUpAppointmentVO;
import org.springblade.modules.groupon.vo.GrouponVO;

import java.util.List;

/**
 * 团购订单表 服务类
 *
 * @author BladeX
 * @since 2023-06-06
 */
public interface IOrderGrouponService extends IService<OrderGroupon> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param orderGroupon
	 * @return
	 */
	IPage<OrderGrouponVO> selectOrderGrouponPage(IPage<OrderGrouponVO> page, OrderGrouponVO orderGroupon);

	/**
	 * 查询团长团购订单
	 * @param page
	 * @param userId
	 * @param grouponState 团购状态 0全部 1-待收货 2-待提货 3-已完成 4-售后
	 * @return
	 */
	IPage<GrouponVO> getCommanderOrder(IPage page, Long userId, Integer grouponState);

	/**
	 * 查询团长团购订单详情
	 * @param grouponId 团购ID
	 * @param queryType 查询类型 1-网点订单  2-全部订单
	 * @param userId
	 * @return
	 */
	GrouponVO getCommanderOrderDetail(Long grouponId, Integer queryType, Long userId, Integer state);

	List<OrderGroupon> getByGrouponIds(List<Long> grouponIds);

	/**
	 * 获取团长取货履约单列表
	 * @param page
	 * @param userId
	 * @param state
	 * @return
	 */
	IPage<AppointmentVO> getPickUpAppointment(IPage<Object> page, Long userId, Integer state, Long salfTakeId);

	/**
	 * 获取取货履约单数据
	 * @param grouponId
	 * @return
	 */
	List<ExportPickUpAppointmentVO> getPickUpAppointmentData(Long grouponId);

    List<ExportAppointmentVO> getPickUpAppointmentDataAll(Long grouponId);
}
