【同步】BOOT 和 CLOUD 的功能

This commit is contained in:
YunaiV
2024-08-31 09:51:21 +08:00
parent 51a37f885b
commit daef8d3b03
22 changed files with 156 additions and 88 deletions

View File

@@ -9,12 +9,12 @@ import cn.iocoder.yudao.module.promotion.enums.coupon.CouponTemplateValidityType
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.AssertTrue;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import jakarta.validation.constraints.AssertTrue;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
@@ -23,9 +23,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
/**
* 优惠劵模板 Base VO提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
* 优惠劵模板 Base VO提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
@Data
public class CouponTemplateBaseVO {
@@ -33,6 +33,9 @@ public class CouponTemplateBaseVO {
@NotNull(message = "优惠劵名不能为空")
private String name;
@Schema(description = "优惠券说明", example = "优惠券使用说明")
private String description;
@Schema(description = "发行总量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") // -1 - 则表示不限制发放数量
@NotNull(message = "发行总量不能为空")
private Integer totalCount;

View File

@@ -17,6 +17,9 @@ public class AppCouponTemplateRespVO {
@Schema(description = "优惠劵名", requiredMode = Schema.RequiredMode.REQUIRED, example = "春节送送送")
private String name;
@Schema(description = "优惠券说明", example = "优惠券使用说明")
private String description;
@Schema(description = "每人限领个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "66") // -1 - 则表示不限制
private Integer takeLimitCount;

View File

@@ -40,6 +40,10 @@ public class CouponTemplateDO extends BaseDO {
* 优惠劵名
*/
private String name;
/**
* 优惠券说明
*/
private String description;
/**
* 状态
*
@@ -158,9 +162,9 @@ public class CouponTemplateDO extends BaseDO {
* 使用优惠券的次数
*/
private Integer useCount;
// ========== 统计信息 END ==========
// TODO 芋艿:领取开始时间、领取结束时间
// TODO 芋艿:要不要加描述
}