one_after 3 месяцев назад
Родитель
Сommit
0a953831ef

+ 2 - 2
app/business/TaskBusiness.php

@@ -134,7 +134,7 @@ class TaskBusiness
             }
             $proder = Db::table('wa_payorder')->where('id', $cronTask->order_id)->first();
             if (empty($proder)) {
-                Db::table('wa_cron_task')->where('id', $taskId)->update([
+                Db::table('wa_cron_task_four')->where('id', $taskId)->update([
                     'is_finish' => 2
                 ]);
             }
@@ -162,7 +162,7 @@ class TaskBusiness
                     Db::table('wa_users')->where('id', $usersData->id)->update(['money_fourteen'=>$usersData->accumulate_fourteen]);
                 }
             }
-            Db::table('wa_cron_task_sign_two')->where('id', $taskId)->update([
+            Db::table('wa_cron_task_four')->where('id', $taskId)->update([
                 'day_dividend_time' => strtotime(date('Y-m-d', strtotime('+1 days')) . ' 00:00:00'),
                 'is_day'            => 2
             ]);

+ 2 - 2
app/business/WithdrawBusiness.php

@@ -178,12 +178,12 @@ class WithdrawBusiness
             }elseif ($param['mold'] == 10){
                 StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType23, $param['mold'], moldTypefild($param['mold']), $withdrawId);
                 Db::table('wa_system')->where('id',1)->increment('completion_progress',10);
-            } if ($param['mold'] == 1) {
+            } elseif ($param['mold'] == 1) {
                 StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, $param['mold'], moldTypefild($param['mold']), $withdrawId);
                 StreamBusiness::addStream($param['user_data']['id'], $param['money'], streamType4, moldType10, moldTypefild10, $withdrawId);
                 StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, moldType4, moldTypefild4, $withdrawId);
                 StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, moldType14, moldTypefild14, $withdrawId);
-            } if ($param['mold'] == 55) {
+            }elseif ($param['mold'] == 55) {
                 StreamBusiness::delStream($param['user_data']['id'], $param['money'], streamType4, moldType5,moldTypefild5, $withdrawId);
                 StreamBusiness::addStream($param['user_data']['id'], bcmul($param['money'],$system->coin_value,2), streamType4, moldType10, moldTypefild10, $withdrawId);
                 StreamBusiness::delStream($param['user_data']['id'], bcmul($param['money'],$system->coin_value,2), streamType4, moldType4, moldTypefild4, $withdrawId);

+ 7 - 5
app/controller/UserController.php

@@ -143,10 +143,10 @@ class UserController
 
         $has = Db::table('wa_stream')
             ->where('user_id', $request->user_data['id'])
-            ->where('type', streamType34)
+            ->where('type', streamType39)
             ->exists();
         if (empty($has)) {
-            StreamBusiness::addStream($request->user_data['id'], 10000, streamType38, moldType10, moldTypefild10);
+            StreamBusiness::addStream($request->user_data['id'], $request->user_data['money_ten'], streamType39, moldType10, moldTypefild10);
         }
 
         $has       = Db::table('wa_stream')
@@ -163,11 +163,13 @@ class UserController
         if (empty($has) && !empty($orderlist)) {
             StreamBusiness::addStream($request->user_data['id'], 20, streamType35, moldType7, moldTypefild7);
         }
+
+        $social_cark = Db::table('wa_user_social_cark')->where('user_id', $request->user_data['id'])->value('ranking');
         $rs_refresh = Db::table('wa_users')->where('id', $request->user_data['id'])->value('is_refresh');
-        if ($rs_refresh == 0) {
-            $ranking = mt_rand(880000, 900000);
+        if ($rs_refresh != 2 && $social_cark > 300000) {
+            $ranking = bcsub($social_cark,300000);
             Db::table('wa_user_social_cark')->where('user_id', $request->user_data['id'])->update(['ranking' => $ranking]);
-            Db::table('wa_users')->where('id', $request->user_data['id'])->update(['is_refresh' => 1]);
+            Db::table('wa_users')->where('id', $request->user_data['id'])->update(['is_refresh' => 2]);
         }
 
         return success($arr);

+ 6 - 0
app/functions.php

@@ -336,6 +336,8 @@
     define('streamType37', 37);
     /** 平台赠送 */
     define('streamType38', 38);
+    /** 平台赠送 */
+    define('streamType39', 39);
     function streamType($value = '')
     {
         $arr = [
@@ -490,6 +492,10 @@
             [
                 'value' => 38,
                 'name'  => '平台赠送',
+            ],
+            [
+                'value' => 39,
+                'name'  => '平台赠送',
             ]
         ];
         if ($value) {