shish %!s(int64=3) %!d(string=hai) anos
pai
achega
0e85cde33d
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  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';
     public static $baseFile = '\bizGhs\product\classes\ProductClass';
 
 
-    //特价花材分类
+    //特价
     const TJ_CLASS_ID = '-1';
     const TJ_CLASS_ID = '-1';
-    //常用花材分类
+    //常用
     const OFTEN_CLASS_ID = '-2';
     const OFTEN_CLASS_ID = '-2';
+    //预售
     const PRESELL_CLASS_ID = '-3';
     const PRESELL_CLASS_ID = '-3';
 
 
     //组装分类花材数据
     //组装分类花材数据
@@ -31,11 +32,14 @@ class ProductService extends BaseService
         $preSellItem = [];
         $preSellItem = [];
         if ($itemInfoData) {
         if ($itemInfoData) {
             foreach ($itemInfoData as $v) {
             foreach ($itemInfoData as $v) {
-                $v['classId'] = self::TJ_CLASS_ID;
                 if (isset($v['discountPrice']) && $v['discountPrice'] > 0) {
                 if (isset($v['discountPrice']) && $v['discountPrice'] > 0) {
+                    $v['classId'] = self::TJ_CLASS_ID;
+                    $v['className'] = '今日特价';
                     $tjItem[] = $v;
                     $tjItem[] = $v;
                 }
                 }
                 if (isset($v['presell']) && $v['presell'] == 1) {
                 if (isset($v['presell']) && $v['presell'] == 1) {
+                    $v['classId'] = self::PRESELL_CLASS_ID;
+                    $v['className'] = '预售专区';
                     $preSellItem[] = $v;
                     $preSellItem[] = $v;
                 }
                 }
             }
             }