package com.ylx.coupon.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ylx.coupon.domain.Coupon;

import java.math.BigDecimal;

/**
 * 优惠券的规则信息(Coupon)表服务接口
 *
 * @author makejava
 * @since 2024-05-13 16:32:59
 */
public interface CouponService extends IService<Coupon> {

    BigDecimal calculateDiscountAmount(String couponId, String openId,BigDecimal orderAmount);

    void useCoupon(String couponId, String openId, Long orderId, Integer orderType);

    void returnCoupon(String couponId, String openId, Long orderId);

}

