1
This commit is contained in:
parent
537ddb960c
commit
d76d663e04
@ -260,30 +260,6 @@ class ShopController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$orderId = OrderId::gen();
|
$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(
|
$this->_rspData(array(
|
||||||
'order_id' => $order_id,
|
'order_id' => $order_id,
|
||||||
));
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user