|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
|
import com.fjhx.service.material.MaterialService;
|
|
|
+import com.fjhx.service.product.ProductSpuService;
|
|
|
import com.fjhx.service.supplier.SupplierService;
|
|
|
import lombok.Getter;
|
|
|
|
|
@@ -18,14 +19,16 @@ public enum CodeEnum {
|
|
|
// 供应商code
|
|
|
SUPPLIER("GY", null, "code", 5, SupplierService.class),
|
|
|
// 物料code
|
|
|
- MATERIAL("M", null, "code", 5, MaterialService.class);
|
|
|
+ MATERIAL("M", null, "code", 5, MaterialService.class),
|
|
|
+ // 物料code
|
|
|
+ SPU("SPU", null, "code", 5, ProductSpuService.class);
|
|
|
|
|
|
- CodeEnum(String prefix, String dateFormat, String codeFieldName, Integer length, Class<? extends IService<?>> entityCls) {
|
|
|
+ CodeEnum(String prefix, String dateFormat, String codeFieldName, Integer length, Class<? extends IService<?>> serviceCls) {
|
|
|
this.prefix = prefix;
|
|
|
this.dateFormat = dateFormat;
|
|
|
this.length = length;
|
|
|
this.codeFieldName = codeFieldName;
|
|
|
- this.service = SpringUtil.getBean(entityCls);
|
|
|
+ this.service = SpringUtil.getBean(serviceCls);
|
|
|
}
|
|
|
|
|
|
// 编码前缀
|