Commit 6786aa352bc6b8801f5b5829340a206ab356629e
1 parent
502fa11f
修正DO对齐数据库表字段,VO对齐前端
Showing
5 changed files
with
18 additions
and
7 deletions
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryBaseVO.java
| @@ -32,7 +32,7 @@ public class ProductCategoryBaseVO { | @@ -32,7 +32,7 @@ public class ProductCategoryBaseVO { | ||
| 32 | @NotNull(message = "开启状态不能为空") | 32 | @NotNull(message = "开启状态不能为空") |
| 33 | private Integer status; | 33 | private Integer status; |
| 34 | 34 | ||
| 35 | - @Schema(description = "PC端分类图") | ||
| 36 | - private String bigPicUrl; | 35 | + //@Schema(description = "PC端分类图") TODO 数据库没有这个字段 |
| 36 | + //private String bigPicUrl; | ||
| 37 | 37 | ||
| 38 | } | 38 | } |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryCreateReqVO.java
| @@ -5,10 +5,13 @@ import lombok.Data; | @@ -5,10 +5,13 @@ import lombok.Data; | ||
| 5 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 6 | import lombok.ToString; | 6 | import lombok.ToString; |
| 7 | 7 | ||
| 8 | +import javax.validation.constraints.NotBlank; | ||
| 9 | + | ||
| 8 | @Schema(description = "管理后台 - 商品分类创建 Request VO") | 10 | @Schema(description = "管理后台 - 商品分类创建 Request VO") |
| 9 | @Data | 11 | @Data |
| 10 | @EqualsAndHashCode(callSuper = true) | 12 | @EqualsAndHashCode(callSuper = true) |
| 11 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 12 | public class ProductCategoryCreateReqVO extends ProductCategoryBaseVO { | 14 | public class ProductCategoryCreateReqVO extends ProductCategoryBaseVO { |
| 13 | - | 15 | + @Schema(description = "分类描述") |
| 16 | + private String description; | ||
| 14 | } | 17 | } |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/category/vo/ProductCategoryUpdateReqVO.java
| @@ -5,6 +5,7 @@ import lombok.Data; | @@ -5,6 +5,7 @@ import lombok.Data; | ||
| 5 | import lombok.EqualsAndHashCode; | 5 | import lombok.EqualsAndHashCode; |
| 6 | import lombok.ToString; | 6 | import lombok.ToString; |
| 7 | 7 | ||
| 8 | +import javax.validation.constraints.NotBlank; | ||
| 8 | import javax.validation.constraints.NotNull; | 9 | import javax.validation.constraints.NotNull; |
| 9 | 10 | ||
| 10 | @Schema(description = "管理后台 - 商品分类更新 Request VO") | 11 | @Schema(description = "管理后台 - 商品分类更新 Request VO") |
| @@ -16,5 +17,7 @@ public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO { | @@ -16,5 +17,7 @@ public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO { | ||
| 16 | @Schema(description = "分类编号", required = true, example = "2") | 17 | @Schema(description = "分类编号", required = true, example = "2") |
| 17 | @NotNull(message = "分类编号不能为空") | 18 | @NotNull(message = "分类编号不能为空") |
| 18 | private Long id; | 19 | private Long id; |
| 20 | + @Schema(description = "分类描述") | ||
| 21 | + private String description; | ||
| 19 | 22 | ||
| 20 | } | 23 | } |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/category/ProductCategoryDO.java
| @@ -60,8 +60,13 @@ public class ProductCategoryDO extends BaseDO { | @@ -60,8 +60,13 @@ public class ProductCategoryDO extends BaseDO { | ||
| 60 | */ | 60 | */ |
| 61 | private Integer status; | 61 | private Integer status; |
| 62 | /** | 62 | /** |
| 63 | - * PC端分类图 | 63 | + * 描述 |
| 64 | */ | 64 | */ |
| 65 | - private String bigPicUrl; | 65 | + private String description; |
| 66 | + | ||
| 67 | + /** | ||
| 68 | + * PC端分类图 TODO 数据库没有这个字段 | ||
| 69 | + */ | ||
| 70 | + //private String bigPicUrl; | ||
| 66 | 71 | ||
| 67 | } | 72 | } |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/category/ProductCategoryServiceImplTest.java
| @@ -40,8 +40,8 @@ public class ProductCategoryServiceImplTest extends BaseDbUnitTest { | @@ -40,8 +40,8 @@ public class ProductCategoryServiceImplTest extends BaseDbUnitTest { | ||
| 40 | public void testCreateCategory_success() { | 40 | public void testCreateCategory_success() { |
| 41 | // 准备参数 | 41 | // 准备参数 |
| 42 | ProductCategoryCreateReqVO reqVO = randomPojo(ProductCategoryCreateReqVO.class,o -> { | 42 | ProductCategoryCreateReqVO reqVO = randomPojo(ProductCategoryCreateReqVO.class,o -> { |
| 43 | - // 设置PC端图片可为空 | ||
| 44 | - o.setBigPicUrl(null); | 43 | + // 设置PC端图片可为空 TODO 数据库没有这个字段 |
| 44 | + //o.setBigPicUrl(null); | ||
| 45 | }); | 45 | }); |
| 46 | 46 | ||
| 47 | // mock 父类 | 47 | // mock 父类 |