Эх сурвалжийг харах

excel 导入数据新增字段

ghost 4 жил өмнө
parent
commit
cb7d92b058

+ 6 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dto/param/PmsProductExcel.java

@@ -19,6 +19,12 @@ public class PmsProductExcel implements Serializable {
      */
     @ExcelProperty("产品品牌")
     private String brandName;
+
+    /**
+     * 产品大类型名称
+     */
+    @ExcelProperty("产品大类")
+    private String productBigCategoryName;
     /**
      * 类型名称
      */

+ 2 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dto/param/PmsProductParam.java

@@ -13,6 +13,8 @@ public class PmsProductParam {
     private Long id;
     @ExcelIgnore
     private Long brandId;
+
+    private String productBigCategoryName;
     @ExcelIgnore
     private Long productCategoryId;
     @ExcelIgnore

+ 2 - 0
forest-admin/admin-server/src/main/resources/dao/ProductExcelDao.xml

@@ -5,6 +5,7 @@
          INSERT INTO pms_product
            (
             brand_id,
+            product_big_category_name,
             product_category_id,
             feight_template_id,
             product_attribute_category_id,
@@ -61,6 +62,7 @@
         <foreach collection="list" item="item" index="index" separator=",">
          <trim prefix="(" suffix=")" suffixOverrides=",">
              #{item.brandId},
+             #{item.productBigCategoryName},
              #{item.productCategoryId},
              #{item.feightTemplateId},
              #{item.productAttributeCategoryId},