You've already forked FrameTour-BE
feat(pricing): 实现首次打印自动发券功能
- 新增自动发券服务接口 IAutoCouponService- 实现自动发券逻辑,包括参数校验、优惠券配置查询和发券记录检查 - 在打印服务中集成自动发券调用,确保首次打印时触发发券- 添加异常处理,避免发券失败影响主流程 - 支持通过优惠券名称和商品类型匹配规则查找目标优惠券
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.ycwl.basic.pricing.service;
|
||||
|
||||
import com.ycwl.basic.pricing.enums.ProductType;
|
||||
|
||||
/**
|
||||
* 自动发券服务接口
|
||||
* 负责在特定场景下自动为用户发放优惠券
|
||||
*/
|
||||
public interface IAutoCouponService {
|
||||
|
||||
/**
|
||||
* 自动为用户发放首次打印优惠券
|
||||
*
|
||||
* @param memberId 用户ID (member_id)
|
||||
* @param faceId 人脸ID (face_id)
|
||||
* @param scenicId 景区ID
|
||||
* @param productType 商品类型
|
||||
* @return 是否成功发券
|
||||
*/
|
||||
boolean autoGrantFirstPrintCoupon(Long memberId, Long faceId, Long scenicId, ProductType productType);
|
||||
}
|
||||
Reference in New Issue
Block a user