Browse Source

钱包迁移,api

lizhen_gitee 2 years ago
parent
commit
5fdcbdf56c

+ 1 - 3
application/api/controller/Usersign.php

@@ -142,9 +142,7 @@ class Usersign extends Api
                 }
                 }
                 $data['goldnum'] = $gift['num'];
                 $data['goldnum'] = $gift['num'];
                 $data['remark'] = '签到钻石'.$gift['num'];
                 $data['remark'] = '签到钻石'.$gift['num'];
-                $user = model('User')->find($uid);
-                $userJewel = isset($user['jewel']) ? $user['jewel'] : 0;
-                $rs_wallet = model('wallet')->lockChangeAccountRemain($uid,$gift['num'],'+',$userJewel,$data['remark'],16,'jewel');
+                $rs_wallet = model('wallet')->lockChangeAccountRemain($uid,$gift['num'],'+',0,$data['remark'],16,'jewel');
                 if (!$rs_wallet['status']) {
                 if (!$rs_wallet['status']) {
                     throw new Exception($rs_wallet['msg']);
                     throw new Exception($rs_wallet['msg']);
                 }
                 }

+ 1 - 1
application/common/service/UserService.php

@@ -245,7 +245,7 @@ class UserService
                                     $money = config('site.invite_money');
                                     $money = config('site.invite_money');
                                     if ($money > 0) {
                                     if ($money > 0) {
                                         $remark = '邀请推广充值';
                                         $remark = '邀请推广充值';
-                                        $res = model('Wallet')->lockChangeAccountRemain($preUser['id'],$money,'+',$preUser['money'],$remark,103,'money',$userId);
+                                        $res = model('Wallet')->lockChangeAccountRemain($preUser['id'],$money,'+',0,$remark,103,'money',$userId);
                                         if (!$res['status']) {
                                         if (!$res['status']) {
                                             throw new Exception($res['msg']);
                                             throw new Exception($res['msg']);
                                         }
                                         }