创建商品

This commit is contained in:
xuelijun
2025-07-30 10:45:19 +08:00
parent 4675e14813
commit 083b4e0bf1
19 changed files with 195 additions and 33 deletions

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
*
* https://www.mall4j.com/
*
* 未经允许,不可做商业用途!
*
* 版权所有,侵权必究!
*/
package com.tashow.cloud.productapi.enums;
/**
* 商品规格参数、属性类型
* @author lgh
*/
public enum ProdPropRule {
// 规格属性 (用于商品商品发布时关联sku)
SPEC(1),
// 规格参数(用于商品搜索时,与分类关联搜索)
ATTRIBUTE(2);
private Integer num;
public Integer value() {
return num;
}
ProdPropRule(Integer num){
this.num = num;
}
public static ProdPropRule instance(Integer value) {
ProdPropRule[] enums = values();
for (ProdPropRule statusEnum : enums) {
if (statusEnum.value().equals(value)) {
return statusEnum;
}
}
return null;
}
}