Просмотр исходного кода

【器件上传】-- 调整描述字段为必填

wangyc 8 лет назад
Родитель
Сommit
56be0f2b2d

+ 8 - 0
src/main/java/com/uas/platform/b2c/prod/product/component/modal/Component.java

@@ -607,6 +607,14 @@ public class Component implements Serializable {
 		this.company = company;
 	}
 
+	public Integer getLifecycle() {
+		return lifecycle;
+	}
+
+	public void setLifecycle(Integer lifecycle) {
+		this.lifecycle = lifecycle;
+	}
+
 	public String getCompanyUrl() {
 		return companyUrl;
 	}

+ 3 - 1
src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentSubmitServiceImpl.java

@@ -649,7 +649,9 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
                 Object description = row.get(8);
                 if (description != null && StringUtils.hasText(description.toString())) {
                     component.setDescription(description.toString().trim());
-                }
+                } else {
+					throw new IllegalOperatorException(String.format("第%s行描述为空,请补充完全", i + 1));
+				}
 
                 // 参数值
                 Set<PropertyValueCrawl> propertyValues = new HashSet<PropertyValueCrawl>();