Kirin 2 years ago
parent
commit
50d22b6ff1
2 changed files with 5 additions and 3 deletions
  1. 0 1
      app/admin/view/user/user/see.php
  2. 5 2
      app/api/controller/PublicController.php

+ 0 - 1
app/admin/view/user/user/see.php

@@ -251,7 +251,6 @@
                                         <td v-if="item.status==0">--</td>
                                         <td v-else>{{item.balance}}</td>
                                         <td v-if="item.type=='brokerage'">佣金</td>
-                                        <td v-if="item.type=='pay_money'">现金</td>
                                         <td v-else>余额</td>
                                         <td>{{item.title}}</td>
                                         <td>{{item.add_time}}</td>

+ 5 - 2
app/api/controller/PublicController.php

@@ -37,8 +37,11 @@ class PublicController
 
     public function test()
     {
-        $res = ShortLetterRepositories::AliSend('15068611369', ['code' => 123456], 'VERIFICATION_CODE');
-        dump($res);
+        $list = UserBill::where('title', '用户佣金转入余额')->select();
+        foreach ($list as $v) {
+            if ($v['type'] == 'brokerage') UserBill::where('id', $v['id'])->update(['balance' => $v['balance'] - $v['number']]);
+            else if ($v['type'] == 'recharge') UserBill::where('id', $v['id'])->update(['balance' => $v['balance'] + $v['number']]);
+        }
     }
 
     /**