cloudroam
2024-09-03 49726442d0bad78c9211b7ea13d688c03b916ff6
src/main/java/com/mzl/flower/service/coupon/CouponRecordService.java
@@ -6,6 +6,7 @@
import com.mzl.flower.dto.response.coupon.CouponRecordVO;
import com.mzl.flower.entity.coupon.CouponRecordDO;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -40,7 +41,7 @@
     * 根据当月日期设置上个月的日期的优惠券过期
     * @return
     */
    boolean expiredCouponRecordByListCurMonth();
    boolean expiredCouponRecordLastMon();
    Integer statisCouponTemplateCount(QueryCouponStatisticsBO queryCouponStatisticsBO);
@@ -66,4 +67,39 @@
    List<CouponRecordVO> getMineCouponRecordList(QueryMineCouponRecordDTO dto);
    /**
     * 检查优惠券是否到期
     * @param dto
     */
    void checkCouponExpired(QueryMineCouponRecordDTO dto);
    boolean checkCurMonVipCouponExists(String couponId, Long customId, LocalDateTime startDateTime,LocalDateTime endDateTime);
    /**
     * 优惠券使用
     * @param couponId
     * @param orderId
     * @return
     */
    boolean useCoupon(String couponId,String orderId);
    /**
     * 优惠券退单
     * @param couponId
     * @param orderId
     * @return
     */
    boolean cancelCouponUsage(String couponId,String orderId);
    /**
     * 根据订单号查找优惠券信息
     * @param orderId
     * @return
     */
    List<CouponRecordDO> getCouponListByOrderId(String orderId) ;
    CouponRecordDO getCouponByOrderId(String orderId) ;
}