diff --git a/application/admin/dao/PurchasePriceDao.php b/application/admin/dao/PurchasePriceDao.php index dd82af8..606910a 100644 --- a/application/admin/dao/PurchasePriceDao.php +++ b/application/admin/dao/PurchasePriceDao.php @@ -67,6 +67,16 @@ class PurchasePriceDao } /** + * 删除数据 + * @param $purchase_id + */ + public function deleteByOrderId($orderId) + { + $model = new PurchasePrice(); + $model->save(["del_flag" => 1], ["order_id" => $orderId]); + } + + /** * 删除子订单对于的每日价格 * @param $subOrderId */ diff --git a/application/admin/service/OrderMainService.php b/application/admin/service/OrderMainService.php index 93ddc7b..6643e6d 100644 --- a/application/admin/service/OrderMainService.php +++ b/application/admin/service/OrderMainService.php @@ -45,7 +45,7 @@ class OrderMainService $orderItemDao = new OrderItemDao(); $orderItemDao->delete($orderId); $purchasePriceDao = new PurchasePriceDao(); - $purchasePriceDao->delete($orderId); + $purchasePriceDao->deleteByOrderId($orderId); //循环子订单 foreach ($param['subOrderList'] as $subOrderParam) { $subOrderParam['create_id'] = $param['create_id'];