feat(pricing): 增加景区优惠券统计功能并优化优惠券使用逻辑

- 新增景区优惠券统计接口和相关查询方法
- 为优惠券配置和使用记录添加景区ID字段
- 实现优惠券使用时的景区限制检查
- 优化优惠券适用性的判断逻辑,增加对景区和商品类型的检查
This commit is contained in:
2025-08-18 04:58:38 +08:00
parent 9fef17bae5
commit 9e0286e66e
10 changed files with 184 additions and 39 deletions

View File

@@ -44,7 +44,7 @@ public interface ICouponManagementService {
* 分页查询优惠券配置
*/
PageInfo<PriceCouponConfig> getCouponConfigsPage(Integer pageNum, Integer pageSize,
Boolean isActive, String couponName);
Boolean isActive, String couponName, String scenicId);
/**
* 根据状态查询优惠券配置
@@ -68,7 +68,7 @@ public interface ICouponManagementService {
*/
PageInfo<PriceCouponClaimRecord> getClaimRecordsPage(Integer pageNum, Integer pageSize,
Long userId, Long couponId, CouponStatus status,
String startTime, String endTime);
String startTime, String endTime, String scenicId);
/**
* 根据用户ID查询优惠券领取记录
@@ -98,10 +98,15 @@ public interface ICouponManagementService {
/**
* 查询时间范围内的统计数据
*/
Map<String, Object> getPeriodStats(String startDate, String endDate);
Map<String, Object> getPeriodStats(String startDate, String endDate, String scenicId);
/**
* 查询所有优惠券的使用统计概览
*/
List<Map<String, Object>> getAllCouponUsageOverview();
/**
* 查询景区优惠券统计
*/
Map<String, Object> getScenicCouponStats(String scenicId);
}