Commit 476101189ea1a6eeaba555bfadcd7e90793e1340

Authored by YunaiV
1 parent 49685906

【代码优化】商城:优惠劵的描述字段新增

yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/coupon/vo/template/CouponTemplateBaseVO.java
... ... @@ -33,6 +33,9 @@ public class CouponTemplateBaseVO {
33 33 @NotNull(message = "优惠劵名不能为空")
34 34 private String name;
35 35  
  36 + @Schema(description = "优惠券说明", example = "优惠券使用说明")
  37 + private String description;
  38 +
36 39 @Schema(description = "发行总量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") // -1 - 则表示不限制发放数量
37 40 @NotNull(message = "发行总量不能为空")
38 41 private Integer totalCount;
... ... @@ -95,9 +98,6 @@ public class CouponTemplateBaseVO {
95 98 @Schema(description = "折扣上限", example = "100") // 单位:分,仅在 discountType 为 PERCENT 使用
96 99 private Integer discountLimitPrice;
97 100  
98   - @Schema(description = "优惠券说明", example = "优惠券使用说明") // 单位:分,仅在 discountType 为 PERCENT 使用
99   - private String description;
100   -
101 101 @AssertTrue(message = "商品范围编号的数组不能为空")
102 102 @JsonIgnore
103 103 public boolean isProductScopeValuesValid() {
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/vo/template/AppCouponTemplateRespVO.java
1 1 package cn.iocoder.yudao.module.promotion.controller.app.coupon.vo.template;
2 2  
3   -import cn.iocoder.yudao.framework.mybatis.core.type.LongListTypeHandler;
4   -import cn.iocoder.yudao.module.promotion.enums.common.PromotionProductScopeEnum;
5   -import com.baomidou.mybatisplus.annotation.TableField;
6 3 import io.swagger.v3.oas.annotations.media.Schema;
7 4 import lombok.Data;
8 5  
... ... @@ -20,6 +17,9 @@ public class AppCouponTemplateRespVO {
20 17 @Schema(description = "优惠劵名", requiredMode = Schema.RequiredMode.REQUIRED, example = "春节送送送")
21 18 private String name;
22 19  
  20 + @Schema(description = "优惠券说明", example = "优惠券使用说明")
  21 + private String description;
  22 +
23 23 @Schema(description = "每人限领个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "66") // -1 - 则表示不限制
24 24 private Integer takeLimitCount;
25 25  
... ... @@ -67,7 +67,4 @@ public class AppCouponTemplateRespVO {
67 67 @Schema(description = "是否可以领取", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
68 68 private Boolean canTake;
69 69  
70   - @Schema(description = "优惠券说明", example = "优惠券使用说明") // 单位:分,仅在 discountType 为 PERCENT 使用
71   - private String description;
72   -
73 70 }
... ...
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/coupon/CouponTemplateDO.java
... ... @@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.annotation.KeySequence;
11 11 import com.baomidou.mybatisplus.annotation.TableField;
12 12 import com.baomidou.mybatisplus.annotation.TableId;
13 13 import com.baomidou.mybatisplus.annotation.TableName;
14   -import io.swagger.v3.oas.annotations.media.Schema;
15 14 import lombok.Data;
16 15 import lombok.EqualsAndHashCode;
17 16  
... ... @@ -42,6 +41,10 @@ public class CouponTemplateDO extends BaseDO {
42 41 */
43 42 private String name;
44 43 /**
  44 + * 优惠券说明
  45 + */
  46 + private String description;
  47 + /**
45 48 * 状态
46 49 *
47 50 * 枚举 {@link CommonStatusEnum}
... ... @@ -159,10 +162,9 @@ public class CouponTemplateDO extends BaseDO {
159 162 * 使用优惠券的次数
160 163 */
161 164 private Integer useCount;
  165 +
162 166 // ========== 统计信息 END ==========
163 167  
164 168 // TODO 芋艿:领取开始时间、领取结束时间
165 169  
166   - @Schema(description = "优惠券说明", example = "优惠券使用说明") // 单位:分,仅在 discountType 为 PERCENT 使用
167   - private String description;
168 170 }
... ...