package org.springblade.modules.api.service;

import org.springblade.modules.api.request.CartSubmitOrderRequest;
import org.springblade.modules.api.request.SubmitOrderRequest;

import java.math.BigDecimal;

/**
 * Author pangqijun
 * Date 2023/3/15
 * Description
 */
public interface IMallService {

    /**
     * 下单
     * @param request
     * @return
     */
//    String submitOrder(SubmitOrderRequest request);

    /**
     * 购物车下单
     * @param request
     * @return
     */
    String cartSubmitOrder(CartSubmitOrderRequest request);

    /**
     * 计算优惠金额
     * @param orderNo
     * @param totalAmount
     * @param userCouponId
     * @return
     */
    BigDecimal calDiscountAmount(String orderNo, BigDecimal totalAmount, Long userCouponId);
}
