shish 2 лет назад
Родитель
Сommit
92ebaf796a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app-ghs/controllers/OrderItemController.php

+ 1 - 1
app-ghs/controllers/OrderItemController.php

@@ -182,7 +182,7 @@ class OrderItemController extends BaseController
             if ($num <= 0) {
                 util::fail($name . ' 数量要大于0');
             }
-            $new[$id] = ['num' => $num, 'productId' => $id];
+            $new[$id] = ['num' => $num, 'productId' => $id, 'price' => 0];
         }
         $connection = Yii::$app->db;//事务处理
         $transaction = $connection->beginTransaction();