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

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

@@ -18,20 +18,19 @@ class ProductService extends BaseService
     const OFTEN_CLASS_ID = '-2';
 
     //组装分类花材数据
-    public static function assembleData($classIds,  $itemInfoData,  $showSale = false)
+    public static function assembleData($classIds, $itemInfoData, $showSale = false)
     {
         $saleItem = []; //今日特价
 
         if ($itemInfoData) {
             foreach ($itemInfoData as $v) {
                 $v['classId'] = self::ALL_CLASS_ID;
-                if ($v['discountPrice'] > 0) {
+                if (isset($v['discountPrice']) && $v['discountPrice'] > 0) {
                     $saleItem[] = $v;
                 }
             }
         }
 
-        //classId=>itemId
         $classMapItem = [];
         if ($itemInfoData) {
             foreach ($itemInfoData as $v) {