正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
@@ -50,8 +50,8 @@ class OrderModel extends Model | @@ -50,8 +50,8 @@ class OrderModel extends Model | ||
50 | ->find(); | 50 | ->find(); |
51 | Db::startTrans(); | 51 | Db::startTrans(); |
52 | $go = 'rollback'; | 52 | $go = 'rollback'; |
53 | - if ($orderInfo['payment'] == 0) { | ||
54 | $amount = ($order_amount == null) ? $orderInfo['order_amount'] : $order_amount; | 53 | $amount = ($order_amount == null) ? $orderInfo['order_amount'] : $order_amount; |
54 | + if ($orderInfo['payment'] == 0) { | ||
55 | if (Db::name('user')->where(['id' => $orderInfo['user_id']])->setDec('balance', $amount)) { | 55 | if (Db::name('user')->where(['id' => $orderInfo['user_id']])->setDec('balance', $amount)) { |
56 | $wallet = [ | 56 | $wallet = [ |
57 | 'user_id' => $orderInfo['user_id'], | 57 | 'user_id' => $orderInfo['user_id'], |
-
请 注册 或 登录 后发表评论