Kirin 3 rokov pred
rodič
commit
42b2e058e0
1 zmenil súbory, kde vykonal 7 pridanie a 3 odobranie
  1. 7 3
      app/api/controller/PublicController.php

+ 7 - 3
app/api/controller/PublicController.php

@@ -45,9 +45,13 @@ class PublicController
 
     public function test(Request $request)
     {
-        $list = UserBill::where('link_id',96)->where('title','市场分红')->select();
-        foreach ($list as $v){
-            User::bcDec($v['uid'],'brokerage_price',$v['number'],'uid');
+        $list = TreeRecommend::where('id', 96)->find();
+        $up = TreeRecommend::where('id', $list['parent_id'])->find();
+        $i = 12;
+        while ($i--) {
+            $up->get = $up['get']- 135;
+            $up->save();
+            $up = TreeRecommend::where('id', $list['parent_id'])->find();
         }
     }