package co.yixiang.yshop.module.product.api.coupon;

import co.yixiang.yshop.module.product.service.productcouponrelation.AppCouponRelationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author pepis
 * @apiNote
 **/
@Service
public class CouponApiImpl implements CouponApi {
    @Resource
    private AppCouponRelationService appCouponRecordService;

    @Override
    public void receiveCoupon(Long couponId, Long uid) {
        appCouponRecordService.receiveCoupon(couponId, uid);
    }

    @Override
    public Integer getCouponNumber(Long userId) {
        return appCouponRecordService.getCouponNumber(userId);
    }
}
