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

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

@@ -243,7 +243,7 @@ class ProductService extends BaseService
         return $data;
     }
 
-    //生成价格表 ssh 20210922
+    //下载所有花材的库存 ssh 20250328
     public static function generateItemTable($sjId, $level, $mainId = 0)
     {
         $status = 1;
@@ -274,26 +274,12 @@ class ProductService extends BaseService
             if (isset($class['child']) && !empty($class['child'])) {
                 foreach ($class['child'] as $cKey => $child) {
                     $cName = $child['name'] ?? '';
-                    $price = $child['price'] ?? '';
+                    $stock = $child['stock'] ?? '';
                     $formatData[] = [
                         'name' => $cName,
-                        'price' => $price,
+                        'price' => $stock,
                         'type' => 'item',
                     ];
-                    if (isset($child['reachNum']) && $child['reachNum'] > 0) {
-                        if (isset($child['reachNumDiscount']) && $child['reachNumDiscount'] > 0) {
-                            $bigUnit = $child['bigUnit'] ?? '扎';
-                            $reachPrice = bcsub($price, $child['reachNumDiscount'], 2);
-                            $reachPrice = floatval($reachPrice);
-                            $reachName = '    满' . $child['reachNum'] . $bigUnit;
-                            $formatData[] = [
-                                'name' => $reachName,
-                                'price' => $reachPrice,
-                                //满减活动花材
-                                'type' => 'reach',
-                            ];
-                        }
-                    }
                 }
             }
         }