shish 3 лет назад
Родитель
Сommit
0e85cde33d
1 измененных файлов с 7 добавлено и 3 удалено
  1. 7 3
      biz-ghs/product/services/ProductService.php

+ 7 - 3
biz-ghs/product/services/ProductService.php

@@ -17,10 +17,11 @@ class ProductService extends BaseService
 
     public static $baseFile = '\bizGhs\product\classes\ProductClass';
 
-    //特价花材分类
+    //特价
     const TJ_CLASS_ID = '-1';
-    //常用花材分类
+    //常用
     const OFTEN_CLASS_ID = '-2';
+    //预售
     const PRESELL_CLASS_ID = '-3';
 
     //组装分类花材数据
@@ -31,11 +32,14 @@ class ProductService extends BaseService
         $preSellItem = [];
         if ($itemInfoData) {
             foreach ($itemInfoData as $v) {
-                $v['classId'] = self::TJ_CLASS_ID;
                 if (isset($v['discountPrice']) && $v['discountPrice'] > 0) {
+                    $v['classId'] = self::TJ_CLASS_ID;
+                    $v['className'] = '今日特价';
                     $tjItem[] = $v;
                 }
                 if (isset($v['presell']) && $v['presell'] == 1) {
+                    $v['classId'] = self::PRESELL_CLASS_ID;
+                    $v['className'] = '预售专区';
                     $preSellItem[] = $v;
                 }
             }