
package com.tmerclub.cloud.seckill.service;

import com.tmerclub.cloud.common.order.vo.ShopCartOrderMergerVO;
import com.tmerclub.cloud.seckill.vo.SeckillVO;

/**
 * 秒杀订单
 *
 * @author lhd
 * @date 2021-03-30 14:59:28
 */
public interface SeckillOrderService {

    /**
     * 计算订单中的商品数量
     * @param seckill
     * @param userId
     * @param count
     * @return 是否超过限制数量
     */
    boolean checkOrderSpuNum(SeckillVO seckill, Long userId, Integer count);

    /**
     * 提交订单
     *
     * @param mergerOrder
     * @param seckillId
     * @param maxNum
     */
    void submit(ShopCartOrderMergerVO mergerOrder, Long seckillId, Integer maxNum);

    /**
     * 秒杀订单支付成功
     *
     * @param orderId 订单id
     */
    void paySuccessOrderByOrderId(Long orderId);
}
