feat/task1-c-wallet
devil_gong 2018-09-28 14:48:36 +08:00
parent 41909b1566
commit 5f8e35ef24
1 changed files with 2 additions and 3 deletions

View File

@ -223,8 +223,7 @@ class OrderService
// 开启事务 // 开启事务
$m->startTrans(); $m->startTrans();
// 更新支付状态 // 更新订单状态
$where = array('id' => $out_trade_no);
$upd_data = array( $upd_data = array(
'status' => 2, 'status' => 2,
'pay_status'=> 1, 'pay_status'=> 1,
@ -232,7 +231,7 @@ class OrderService
'pay_time' => time(), 'pay_time' => time(),
'upd_time' => time(), 'upd_time' => time(),
); );
if($m->where($where)->save($upd_data)) if($m->where(['id'=>$data['id']])->save($upd_data))
{ {
// 提交事务 // 提交事务
$m->commit(); $m->commit();