From 11c95afd1e44bcd3d70dbcf77e790596ec80a53e Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期二, 24 九月 2024 18:54:59 +0800
Subject: [PATCH] fix: 剔除加价限制条件
---
src/main/java/com/mzl/flower/service/coupon/CouponRecordService.java | 81 ++++++++++++++++++++++++++++++++++++----
1 files changed, 72 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/mzl/flower/service/coupon/CouponRecordService.java b/src/main/java/com/mzl/flower/service/coupon/CouponRecordService.java
index 8ae3a4d..8298870 100644
--- a/src/main/java/com/mzl/flower/service/coupon/CouponRecordService.java
+++ b/src/main/java/com/mzl/flower/service/coupon/CouponRecordService.java
@@ -2,13 +2,12 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
-import com.mzl.flower.dto.request.coupon.CreateCouponRecordDTO;
-import com.mzl.flower.dto.request.coupon.QueryCouponRecordDTO;
-import com.mzl.flower.dto.request.coupon.QueryCouponStatisticsBO;
-import com.mzl.flower.dto.request.coupon.QueryExistCouponDTO;
+import com.mzl.flower.dto.request.coupon.*;
import com.mzl.flower.dto.response.coupon.CouponRecordVO;
import com.mzl.flower.entity.coupon.CouponRecordDO;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
import java.util.List;
/**
@@ -43,19 +42,83 @@
* 根据当月日期设置上个月的日期的优惠券过期
* @return
*/
- boolean expiredCouponRecordByListCurMonth();
+ boolean expiredCouponRecordLastMon();
- int statisCouponTemplateCount(QueryCouponStatisticsBO queryCouponStatisticsBO);
+ Integer statisCouponTemplateCount(QueryCouponStatisticsBO queryCouponStatisticsBO);
- int statisCouponTemplateCurMonCount(QueryCouponStatisticsBO queryCouponStatisticsBO);
+ Integer statisCouponTemplateCurMonCount(QueryCouponStatisticsBO queryCouponStatisticsBO);
- int statisCouponPointCurMonPontAmonut(QueryCouponStatisticsBO queryCouponStatisticsBO);
+ Integer statisCouponPointCurMonPontAmonut(QueryCouponStatisticsBO queryCouponStatisticsBO);
/**
* 根据优惠券种类,优惠券ID,用户的ID查找优惠券的记录数量
* @param queryExistCouponDTO
* @return
*/
- int getExistCouponAmount(QueryExistCouponDTO queryExistCouponDTO);
+ Integer getExistCouponAmount(QueryExistCouponDTO queryExistCouponDTO);
+ /**
+ * 根据优惠券的ID来查找已经领取的优惠券的数量
+ * @param couponId
+ * @return
+ */
+ Integer getExistGainCouponRecordAmountById(String couponId);
+
+ Integer getUserGainCouponRecordAmountById(String couponId,Long customerId);
+
+ /**
+ *
+ * @param couponId
+ * @param userId
+ * @return
+ */
+ Integer getUserGainCouponRecordAmountByUserId(String couponId,String userId);
+
+ List<CouponRecordVO> getMineCouponRecordList(QueryMineCouponRecordDTO dto);
+
+ /**
+ * 检查优惠券是否到期
+ * @param dto
+ */
+ void checkCouponExpired(QueryMineCouponRecordDTO dto);
+
+ boolean checkCurMonVipCouponExists(String couponId, Long customId, LocalDateTime startDateTime,LocalDateTime endDateTime);
+
+
+ /**
+ * 优惠券的使用
+ * @param couponId 优惠券ID
+ * @param orderId 订单的ID
+ * @param orderMount 订单的金额
+ * @return
+ */
+ boolean useCoupon(String couponId, String orderId, BigDecimal orderMount);
+
+ /**
+ * 优惠券退单
+ * @param orderId
+ * @return
+ */
+ boolean cancelCouponUsage(String orderId);
+
+ /**
+ * 根据订单号查找优惠券信息
+ * @param orderId
+ * @return
+ */
+ List<CouponRecordDO> getCouponListByOrderId(String orderId) ;
+
+
+ CouponRecordDO getCouponByOrderId(String orderId) ;
+
+ /**
+ * 查看当前人员是否已经重复发过此优惠券
+ * @param couponId
+ * @param customId
+ * @return
+ */
+ boolean checkUserCouponExists(String couponId, Long customId);
+
+
+ boolean expireCouponRecordAll();
}
--
Gitblit v1.9.3