package com.yiqi.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yiqi.common.core.domain.R;
import com.yiqi.order.domain.OrderActivity;
import com.yiqi.order.domain.dto.ActivityOrderDTO;
import com.yiqi.order.domain.dto.OrderActivityQueryDTO;
import com.yiqi.order.domain.dto.OrderActivityRefundDTO;
import com.yiqi.order.domain.vo.OrderActivityPayResultVO;
import com.yiqi.order.domain.vo.OrderActivityVO;

import java.util.List;

/**
 * 活动订单Service接口
 *
 * @author ruoyi
 * @date 2023-09-30
 */
public interface IOrderActivityService extends IService<OrderActivity> {
    /**
     * 查询活动订单
     *
     * @param id 活动订单主键
     * @return 活动订单
     */
    public OrderActivity selectOrderActivityById(Long id);

    /**
     * 查询活动订单列表
     *
     * @param orderActivityQueryDTO 活动订单
     * @return 活动订单集合
     */
    public List<OrderActivityVO> selectOrderActivityList(OrderActivityQueryDTO orderActivityQueryDTO);

    /**
     * 修改活动订单
     *
     * @param orderActivity 活动订单
     * @return 结果
     */
    public int updateOrderActivity(OrderActivity orderActivity);

    /**
     * 批量删除活动订单
     *
     * @param ids 需要删除的活动订单主键集合
     * @return 结果
     */
    public int deleteOrderActivityByIds(Long[] ids);

    /**
     * 删除活动订单信息
     *
     * @param id 活动订单主键
     * @return 结果
     */
    public int deleteOrderActivityById(Long id);

    /**
     * 新增活动订单
     *
     * @param activityOrderDTO 活动订单
     * @return 结果
     */
    public OrderActivityPayResultVO insertOrderActivity(ActivityOrderDTO activityOrderDTO);


    /**
     * 支付成功后，处理活动订单
     *
     * @param orderNo
     * @return
     */
    public R handlePaySuccessUpdateActivityOrderStatus(String orderNo);

    /**
     * 活动订单-处理支付失败
     *
     * @param orderNo
     * @return 处理支付失败
     */
    public String handleCancelActivityOrder(String orderNo);


    /**
     * 活动订单-总部撤单申请
     */
    public int refundOrderActivityApply(OrderActivityRefundDTO orderActivityRefundDTO, String sourceType);

    public R refundSuccess(String orderNo);

    public R refundClosed(String orderNo);

    public R refundError(String orderNo);
}
