商品规格 value 的迁移
This commit is contained in:
@@ -2,10 +2,7 @@ package cn.iocoder.mall.productservice.rpc.attr;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrKeyCreateReqDTO;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrKeyPageReqDTO;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrKeyRespDTO;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.dto.ProductAttrKeyUpdateReqDTO;
|
||||
import cn.iocoder.mall.productservice.rpc.attr.dto.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,13 +26,6 @@ public interface ProductAttrRpc {
|
||||
*/
|
||||
CommonResult<Boolean> updateProductAttrKey(ProductAttrKeyUpdateReqDTO updateDTO);
|
||||
|
||||
/**
|
||||
* 删除商品规格键
|
||||
*
|
||||
* @param productAttrKeyId 商品规格键编号
|
||||
*/
|
||||
CommonResult<Boolean> deleteProductAttrKey(Integer productAttrKeyId);
|
||||
|
||||
/**
|
||||
* 获得商品规格键
|
||||
*
|
||||
@@ -60,4 +50,35 @@ public interface ProductAttrRpc {
|
||||
*/
|
||||
CommonResult<PageResult<ProductAttrKeyRespDTO>> pageProductAttrKey(ProductAttrKeyPageReqDTO pageDTO);
|
||||
|
||||
/**
|
||||
* 创建商品规格值
|
||||
*
|
||||
* @param createDTO 创建商品规格值 DTO
|
||||
* @return 商品规格值编号
|
||||
*/
|
||||
CommonResult<Integer> createProductAttrValue(ProductAttrValueCreateReqDTO createDTO);
|
||||
|
||||
/**
|
||||
* 更新商品规格值
|
||||
*
|
||||
* @param updateDTO 更新商品规格值 DTO
|
||||
*/
|
||||
CommonResult<Boolean> updateProductAttrValue(ProductAttrValueUpdateReqDTO updateDTO);
|
||||
|
||||
/**
|
||||
* 获得商品规格值
|
||||
*
|
||||
* @param productAttrValueId 商品规格值编号
|
||||
* @return 商品规格值
|
||||
*/
|
||||
CommonResult<ProductAttrValueRespDTO> getProductAttrValue(Integer productAttrValueId);
|
||||
|
||||
/**
|
||||
* 获得商品规格值列表
|
||||
*
|
||||
* @param productAttrValueIds 商品规格值编号列表
|
||||
* @return 商品规格值列表
|
||||
*/
|
||||
CommonResult<List<ProductAttrValueRespDTO>> listProductAttrValues(List<Integer> productAttrValueIds);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package cn.iocoder.mall.productservice.rpc.attr.dto;
|
||||
|
||||
import cn.iocoder.common.framework.enums.CommonStatusEnum;
|
||||
import cn.iocoder.common.framework.validator.InEnum;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -23,6 +25,7 @@ public class ProductAttrKeyCreateReqDTO implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package cn.iocoder.mall.productservice.rpc.attr.dto;
|
||||
|
||||
import cn.iocoder.common.framework.enums.CommonStatusEnum;
|
||||
import cn.iocoder.common.framework.validator.InEnum;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -28,6 +30,7 @@ public class ProductAttrKeyUpdateReqDTO implements Serializable {
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.iocoder.mall.productservice.rpc.attr.dto;
|
||||
|
||||
import cn.iocoder.common.framework.enums.CommonStatusEnum;
|
||||
import cn.iocoder.common.framework.validator.InEnum;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品规格值创建 Request DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrValueCreateReqDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 规格键编号
|
||||
*/
|
||||
@NotNull(message = "规格键编号不能为空")
|
||||
private Integer attrKeyId;
|
||||
/**
|
||||
* 规格值名字
|
||||
*/
|
||||
@NotEmpty(message = "规格值名字不能为空")
|
||||
private String name;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package cn.iocoder.mall.productservice.rpc.attr.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 商品规格值 Response DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrValueRespDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 规格值编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 规格键编号
|
||||
*/
|
||||
private Integer attrKeyId;
|
||||
/**
|
||||
* 规格值名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package cn.iocoder.mall.productservice.rpc.attr.dto;
|
||||
|
||||
import cn.iocoder.common.framework.enums.CommonStatusEnum;
|
||||
import cn.iocoder.common.framework.validator.InEnum;
|
||||
import lombok.*;
|
||||
import lombok.experimental.*;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 商品规格值更新 Request DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductAttrValueUpdateReqDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 规格值编号
|
||||
*/
|
||||
@NotNull(message = "规格值编号不能为空")
|
||||
private Integer id;
|
||||
/**
|
||||
* 规格键编号
|
||||
*/
|
||||
@NotNull(message = "规格键编号不能为空")
|
||||
private Integer attrKeyId;
|
||||
/**
|
||||
* 规格值名字
|
||||
*/
|
||||
@NotEmpty(message = "规格值名字不能为空")
|
||||
private String name;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user