Browse Source

商品信息导入增加积分列

liyuan 6 months ago
parent
commit
b376ea2639

+ 6 - 2
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/excel/GoodsExcel.java

@@ -4,8 +4,6 @@ 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 java.io.Serializable;
@@ -101,6 +99,12 @@ public class GoodsExcel implements Serializable {
 	private String cnameInt;
 
 	/**
+	 * 兑换积分
+	 */
+	@ExcelProperty(value = "商品积分")
+	private BigDecimal integral;
+
+	/**
 	 * 商品描述
 	 */
 	@ExcelProperty(value = "商品描述")

+ 3 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/goods/service/impl/GoodsDescServiceImpl.java

@@ -391,7 +391,9 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, PjGoodsDe
 			goodsDesc.setGoodsTypeName(e.getGoodsTypeName());
 			goodsDesc.setUnit(e.getUnit());
 			goodsDesc.setEnableOrNot(1);
-
+			if (!org.springframework.util.ObjectUtils.isEmpty(e.getIntegral())) {
+				goodsDesc.setIntegral(e.getIntegral());
+			}
 			//获得品牌
 			if (ObjectUtils.isNotNull(e.getBrand())) {
 				PjBrandDesc brandDesc = brandDescList.stream().filter(i -> i.getCname().equals(e.getBrand()))