合并代码
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package cn.iocoder.mall.product.api;
|
||||
|
||||
import cn.iocoder.mall.product.api.bo.ProductBrandBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductBrangPageBO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductBrandAddDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductBrandPageDTO;
|
||||
import cn.iocoder.mall.product.api.dto.ProductBrandUpdateDTO;
|
||||
|
||||
public interface ProductBrandService {
|
||||
|
||||
/**
|
||||
* 获取品牌分页数据
|
||||
* @param productBrandPageDTO 翻页参数
|
||||
* @return
|
||||
*/
|
||||
ProductBrangPageBO getProductBrandPage(ProductBrandPageDTO productBrandPageDTO);
|
||||
|
||||
/**
|
||||
* 获取品牌明细
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
ProductBrandBO getProductBrand(Integer id);
|
||||
|
||||
/**
|
||||
* 添加品牌
|
||||
* @param productBrandAddDTO 添加参数
|
||||
* @return
|
||||
*/
|
||||
ProductBrandBO addProductBrand(Integer adminId, ProductBrandAddDTO productBrandAddDTO);
|
||||
|
||||
/**
|
||||
* 更新品牌
|
||||
* @param productBrandUpdateDTO 更新参数
|
||||
* @return
|
||||
*/
|
||||
Boolean updateProductBrand(Integer adminId, ProductBrandUpdateDTO productBrandUpdateDTO);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package cn.iocoder.mall.product.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品品牌 VO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductBrandBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 规格编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* 1-开启
|
||||
* 2-禁用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.iocoder.mall.product.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品品牌分页 BO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductBrangPageBO implements Serializable {
|
||||
|
||||
/**
|
||||
* 品牌数组
|
||||
*/
|
||||
private List<ProductBrandBO> brands;
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Integer count;
|
||||
|
||||
}
|
||||
@@ -30,6 +30,9 @@ public enum ProductErrorCodeEnum {
|
||||
PRODUCT_ATTR_STATUS_EQUALS(1003003003, "商品规格已经是该状态"),
|
||||
PRODUCT_ATTR_VALUE_EXISTS(1003003004, "商品规格值已经存在"),
|
||||
PRODUCT_ATTR_VALUE_STATUS_EQUALS(1003003005, "商品规格值已经是该状态"),
|
||||
|
||||
// ========== PRODUCT BRAND模块 ==========
|
||||
PRODUCT_BRAND_EXIST(1003004000, "品牌值已经存在"),
|
||||
;
|
||||
|
||||
private final int code;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.iocoder.mall.product.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Product 品牌添加 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductBrandAddDTO {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotEmpty(message = "品牌名不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@NotEmpty(message = "品牌描述不能为空")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
@NotEmpty(message = "品牌图片地址不能为空")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* 1-开启
|
||||
* 2-禁用
|
||||
*/
|
||||
@NotNull(message = "品牌状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.iocoder.mall.product.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 商品品牌分页 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductBrandPageDTO {
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态 1-开启 2-禁用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "页码不能为空")
|
||||
private Integer pageNo;
|
||||
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package cn.iocoder.mall.product.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* Product 品牌添加 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProductBrandUpdateDTO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "品牌主键不能为空")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotEmpty(message = "品牌名不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@NotEmpty(message = "品牌描述不能为空")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
@NotEmpty(message = "品牌图片地址不能为空")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
* 1-开启
|
||||
* 2-禁用
|
||||
*/
|
||||
@NotNull(message = "品牌状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user