调整商品模块结构
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.mall.product.biz.enums.product;
|
||||
package cn.iocoder.mall.product.biz.enums.attr;
|
||||
|
||||
public class ProductAttrConstants {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package cn.iocoder.mall.product.biz.enums.category;
|
||||
|
||||
public class ProductCategoryConstants {
|
||||
|
||||
/**
|
||||
* 父分类编号 - 根节点
|
||||
*/
|
||||
public static final Integer PID_ROOT = 0;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package cn.iocoder.mall.product.biz.enums.category;
|
||||
|
||||
import cn.iocoder.common.framework.core.IntArrayValuable;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @Author: jiangweifan
|
||||
* @Date: 2020/5/12
|
||||
* @Description: 商品分类状态枚举
|
||||
*/
|
||||
public enum ProductCategoryStatusEnum implements IntArrayValuable {
|
||||
|
||||
ENABLED(1, "启用"),
|
||||
DISABLED(2, "禁用");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ProductCategoryStatusEnum::getStatus).toArray();
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer status;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
ProductCategoryStatusEnum(Integer status, String name) {
|
||||
this.status = status;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package cn.iocoder.mall.product.biz.enums.product;
|
||||
|
||||
public class ProductCategoryConstants {
|
||||
|
||||
/**
|
||||
* 状态 - 开启
|
||||
*/
|
||||
public static final Integer STATUS_ENABLE = 1;
|
||||
/**
|
||||
* 状态 - 关闭
|
||||
*/
|
||||
public static final Integer STATUS_DISABLE = 2;
|
||||
|
||||
/**
|
||||
* 父分类编号 - 根节点
|
||||
*/
|
||||
public static final Integer PID_ROOT = 0;
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.iocoder.mall.product.biz.enums.product;
|
||||
package cn.iocoder.mall.product.biz.enums.spu;
|
||||
|
||||
public class ProductSpuConstants {
|
||||
|
||||
Reference in New Issue
Block a user