shish 5 лет назад
Родитель
Сommit
4025e758f5
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      console/controllers/ProductController.php

+ 2 - 1
console/controllers/ProductController.php

@@ -59,9 +59,10 @@ class ProductController extends Controller
             $ptItem = PtItemClass::getById($itemId, true);
             $weight = $product->weight ?? 0;
             if (!empty($weight)) {
+                $preWeight = $ptItem->weight ?? 0;
                 $ptItem->weight = $weight;
                 $ptItem->save();
-                echo "平台花材{$ptItem->id} 重量更新为{$weight} \n";
+                echo "平台花材{$ptItem->id} 重量由{$preWeight}更新为{$weight} \n";
             }
         }
     }