promotion:增加获得优惠劵匹配结果的列表

This commit is contained in:
YunaiV
2022-11-08 00:40:53 +08:00
parent fb45f22533
commit edc5d0f1d0
9 changed files with 202 additions and 9 deletions

View File

@ -0,0 +1,35 @@
package cn.iocoder.yudao.module.promotion.api.price.dto;
import lombok.Data;
/**
* 优惠劵的匹配信息 Response DTO
*
* why 放在 price 包下?主要获取的时候,需要涉及到较多的价格计算逻辑,放在 price 可以更好的复用逻辑
*
* @author 芋道源码
*/
@Data
public class CouponMeetRespDTO {
/**
* 优惠劵编号
*/
private Long id;
// ========== 非优惠劵的基本信息字段 ==========
/**
* 是否匹配
*/
private Boolean meet;
/**
* 不匹配的提示,即 {@link #meet} = true 才有值
*
* 例如说:
* 1. 所结算商品没有符合条件的商品
* 2. 差 XXX 元可用优惠劵
* 3. 优惠劵未到使用时间
*/
private String meetTip;
}

View File

@ -31,6 +31,8 @@ public interface ErrorCodeConstants {
// ========== 优惠劵模板 1003005000 ==========
ErrorCode COUPON_NOT_EXISTS = new ErrorCode(1003005000, "优惠劵不存在");
ErrorCode COUPON_DELETE_FAIL_USED = new ErrorCode(1003005001, "回收优惠劵失败,优惠劵已被使用");
ErrorCode COUPON_STATUS_NOT_UNUSED = new ErrorCode(1006003003, "优惠劵不处于待使用状态");
ErrorCode COUPON_VALID_TIME_NOT_NOW = new ErrorCode(1006003004, "优惠劵不在有效期内");
// ========== 满减送活动 1003006000 ==========
ErrorCode REWARD_ACTIVITY_NOT_EXISTS = new ErrorCode(1003006000, "满减送活动不存在");