package edu.whut.domain.trade.service;


import edu.whut.domain.activity.model.entity.UserGroupBuyOrderDetailEntity;
import edu.whut.domain.trade.model.entity.TradeRefundBehaviorEntity;
import edu.whut.domain.trade.model.entity.TradeRefundCommandEntity;
import edu.whut.domain.trade.model.valobj.TeamRefundSuccess;

import java.util.List;

/**
 * 退单，逆向流程接口
 */
public interface ITradeRefundOrderService {

    TradeRefundBehaviorEntity refundOrder(TradeRefundCommandEntity tradeRefundCommandEntity) throws Exception;

    /**
     * 退单恢复锁单库存
     */
    void restoreTeamLockStock(TeamRefundSuccess teamRefundSuccess) throws Exception;


    /**
     * 查询超时未支付订单列表
     * 条件：当前时间不在活动时间范围内、状态为0（初始锁定）、out_trade_time为空
     * @return 超时未支付订单列表，限制10条
     */
    List<UserGroupBuyOrderDetailEntity> queryTimeoutUnpaidOrderList();
}
