修正DO对齐数据库表字段,VO对齐前端

pull/2/head
puhui999 2023-04-24 10:29:02 +08:00
parent 502fa11f1d
commit 6786aa352b
5 changed files with 18 additions and 7 deletions

View File

@ -32,7 +32,7 @@ public class ProductCategoryBaseVO {
@NotNull(message = "开启状态不能为空") @NotNull(message = "开启状态不能为空")
private Integer status; private Integer status;
@Schema(description = "PC端分类图") //@Schema(description = "PC端分类图") TODO 数据库没有这个字段
private String bigPicUrl; //private String bigPicUrl;
} }

View File

@ -5,10 +5,13 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;
import javax.validation.constraints.NotBlank;
@Schema(description = "管理后台 - 商品分类创建 Request VO") @Schema(description = "管理后台 - 商品分类创建 Request VO")
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true) @ToString(callSuper = true)
public class ProductCategoryCreateReqVO extends ProductCategoryBaseVO { public class ProductCategoryCreateReqVO extends ProductCategoryBaseVO {
@Schema(description = "分类描述")
private String description;
} }

View File

@ -5,6 +5,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 商品分类更新 Request VO") @Schema(description = "管理后台 - 商品分类更新 Request VO")
@ -16,5 +17,7 @@ public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO {
@Schema(description = "分类编号", required = true, example = "2") @Schema(description = "分类编号", required = true, example = "2")
@NotNull(message = "分类编号不能为空") @NotNull(message = "分类编号不能为空")
private Long id; private Long id;
@Schema(description = "分类描述")
private String description;
} }

View File

@ -60,8 +60,13 @@ public class ProductCategoryDO extends BaseDO {
*/ */
private Integer status; private Integer status;
/** /**
* PC *
*/ */
private String bigPicUrl; private String description;
/**
* PC TODO
*/
//private String bigPicUrl;
} }

View File

@ -40,8 +40,8 @@ public class ProductCategoryServiceImplTest extends BaseDbUnitTest {
public void testCreateCategory_success() { public void testCreateCategory_success() {
// 准备参数 // 准备参数
ProductCategoryCreateReqVO reqVO = randomPojo(ProductCategoryCreateReqVO.class,o -> { ProductCategoryCreateReqVO reqVO = randomPojo(ProductCategoryCreateReqVO.class,o -> {
// 设置PC端图片可为空 // 设置PC端图片可为空 TODO 数据库没有这个字段
o.setBigPicUrl(null); //o.setBigPicUrl(null);
}); });
// mock 父类 // mock 父类