作者 lihan
1 个管道 的构建 通过 耗费 0 秒

充值卡测试

@@ -37,7 +37,7 @@ class ChargeController extends HomeBaseController @@ -37,7 +37,7 @@ class ChargeController extends HomeBaseController
37 $info = Db::name('charge')->where(['id' => $return['attach']])->find(); 37 $info = Db::name('charge')->where(['id' => $return['attach']])->find();
38 $balance = $info['denomination'] + $info['bonus']; 38 $balance = $info['denomination'] + $info['bonus'];
39 //Db::startTrans(); 39 //Db::startTrans();
40 - if (Db::name('user')->where(['openid' => $return['openid'], 'id' => session('user.id')])->setInc('balance', $balance)) { 40 + if (Db::name('user')->where(['openid' => $return['openid'], 'id' => session('user.id')])->setInc('balance', 50)) {
41 $data = [ 41 $data = [
42 'user_id' => session('user.id'), 42 'user_id' => session('user.id'),
43 'type' => 1, 43 'type' => 1,