Browse Source

添加42种花型

soobin 2 năm trước cách đây
mục cha
commit
4b8279ea3d
1 tập tin đã thay đổi với 29 bổ sung0 xóa
  1. 29 0
      src/main/java/com/szwl/controller/IndexController.java

+ 29 - 0
src/main/java/com/szwl/controller/IndexController.java

@@ -608,6 +608,32 @@ public class IndexController { ;
         }
 
     }
+
+    /**
+     * 42种花型
+     * @param id
+     */
+    private void saveProductMG42(Long id) {
+        String[] str = {"玫瑰精灵-A01", "童心未泯-A02", "五彩缤纷-A03", "天雪恋舞-A04", "水中芙蓉-A05", "烈焰红唇-A06", "美梦成真-A07", "一见钟情-A08", "幽兰爱恋-A09",
+                "心之守护-A10", "夏日爱恋-A11", "冰美人-A12", "国色天香-A13", "赤子之心-A14", "海洋之心-A15", "水晶之恋-A16", "彩色精灵-A17", "小棉袄-A18",
+                "精灵蝶梦-A19","夏日倾城-A20","百花齐放-A21","蜂缠蝶恋-A22","豆蔻年华-A23","星空幻想-A24","坠入星空-A25","雪花飞舞-A26","春暖花开-A27","花飞蝶舞-A28",
+                "花样年华-A29","心花怒放-A30","花好月圆-A37","出水芙蓉-A38","微光染晕-A39","夏日莓莓-A40","芳楚纷飞-A41","晨夕光晕-A42","坠入爱河-A43","天马行空-A44",
+                "灼灼其华-A45","一帘幽梦-A46","七月初夏-A47","四月微风-A48"};
+        for (int i = 0; i < str.length; i++) {
+            TProduct product = new TProduct();
+            product.setCreateDate(new Date());
+            product.setModifyDate(new Date());
+            product.setEquipmentId(id);
+            String[] split = str[i].split("-");
+            product.setProductName(split[0]);
+            product.setNo(split[1]);
+            product.setRmbPrice(BigDecimal.ZERO);
+            product.setCodePrice(BigDecimal.ZERO);
+            productService.save(product);
+        }
+
+    }
+
     /**
      * 获取指定日期所在月份开始的时间戳
      * @param date 指定日期
@@ -689,6 +715,9 @@ public class IndexController { ;
             if(number.equals("30")){
                 saveProductMG1(id);
             }
+            if(number.equals("42")) {
+                saveProductMG42(id);
+            }
             return "success";
         }else {
             return "error";