From d76d663e04f616180056bc54afa564ef64122fa8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 2 Aug 2023 12:53:57 +0800 Subject: [PATCH] 1 --- webapp/controller/ShopController.class.php | 24 ---------------------- 1 file changed, 24 deletions(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 59229865..a7c4ef0c 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -260,30 +260,6 @@ class ShopController extends BaseAuthedController { } $orderId = OrderId::gen(); - $chk = SqlHelper::insert($conn, 't_web2_order', array( - 'status' => 0, - 'createtime' => $self->_getNowTime(), - 'account_id' => $account_id, - 'address' => $address, - 'item_id' => $item_id, - 'item_num' => $item_num, - 'id' => $id, - 'goods_num' => $goodsNum, - 'price' => $goods['price'], - )); - - if (!$chk) { - $this->_rspErr(5, "start purchase failed"); - return; - } - $lastId = $this->lastInsertId($conn); - $order_id = $this->genOrderId($lastId); - - $test = SqlHelper::update($conn, 't_web2_order', array('idx' => $lastId), array('order_id' => $order_id)); - if (!$test) { - $this->_rspErr(6, "start purchase failed"); - return; - } $this->_rspData(array( 'order_id' => $order_id, ));