Browse Source

产品导入添加字段

lazhaoqian 3 years ago
parent
commit
945584cd48

+ 8 - 1
blade-service/blade-client/src/main/java/org/springblade/client/goods/excel/GoodsInfoExcel.java

@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
@@ -64,7 +65,13 @@ public class GoodsInfoExcel implements Serializable {
 
 	@ExcelProperty("积分倍数")
 	private String integralMultiples;
-
+	@ExcelProperty("计量单位")
+	private String unit;
+	/**
+	 * 尺寸
+	 */
+	@ExcelProperty(value = "尺寸")
+	private String size;
 
 
 

+ 2 - 0
blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsDescServiceImpl.java

@@ -468,6 +468,8 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc
 				goodsDesc.setTypeno(e.getTypeNo());
 				goodsDesc.setCntrVolumn(e.getCntrVolumn());
 				goodsDesc.setCartonWeight(e.getCartonWeight());
+				goodsDesc.setUnit(e.getUnit());
+				goodsDesc.setSize(e.getSize());
 				goodsDesc.setType(0L);
 				goodsDesc.setGoodsTypeId(String.valueOf(goodsType.getId()));
 				//如果名称相等 就认为重复