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, ));