From f6e56bbd716a22f679a13608ce0b977659ae8fd8 Mon Sep 17 00:00:00 2001 From: nizongfeng Date: Fri, 1 Jul 2022 17:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/dao/PurchasePriceDao.php | 10 ++++++++++ application/admin/service/OrderMainService.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) 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'];