shen 1 year ago
parent
commit
30220d537d
3 changed files with 30 additions and 19 deletions
  1. 19 19
      app/Console/Kernel.php
  2. 10 0
      app/Http/Controllers/Admin/TestUserController.php
  3. 1 0
      routes/admin.php

+ 19 - 19
app/Console/Kernel.php

@@ -127,25 +127,25 @@ class Kernel extends ConsoleKernel
             $eco -> getecommercebill($date,'ALL','AEAD_AES_256_GCM');
         })->dailyAt('11:00');
 
-        $schedule->call(function (){
-            $date= date("Y-m-d",strtotime("-1 day"));
-            $trade  = new TradeBill();
-            $trade -> getDownWithdraw($date);
-        })->dailyAt('15:00');
-
-        $schedule->call(function (){
-            $date= date("Y-m-d",strtotime("-1 day"));
-            $trade  = new ProfitSharing();
-            $trade -> getprofitsharing($date);
-        })->dailyAt('15:00');
-
-        $schedule->call(function (){
-            $store=Store::where('is_apply',3)->get();
-            foreach ($store as $k=>$v){
-                DwbsUser::where('id',$v->user_id)->update(['province'=>$v->province,'city'=>$v->city,'country'=>$v->area,'address'=>$v->address]);
-            }
-            Log::error('地址同步结束');
-        })->dailyAt('16:15');
+//        $schedule->call(function (){
+//            $date= date("Y-m-d",strtotime("-1 day"));
+//            $trade  = new TradeBill();
+//            $trade -> getDownWithdraw($date);
+//        })->dailyAt('15:00');
+//
+//        $schedule->call(function (){
+//            $date= date("Y-m-d",strtotime("-1 day"));
+//            $trade  = new ProfitSharing();
+//            $trade -> getprofitsharing($date);
+//        })->dailyAt('15:00');
+
+//        $schedule->call(function (){
+//            $store=Store::where('is_apply',3)->get();
+//            foreach ($store as $k=>$v){
+//                DwbsUser::where('id',$v->user_id)->update(['province'=>$v->province,'city'=>$v->city,'country'=>$v->area,'address'=>$v->address]);
+//            }
+//            Log::error('地址同步结束');
+//        })->dailyAt('16:15');
     }
 
     /**

+ 10 - 0
app/Http/Controllers/Admin/TestUserController.php

@@ -4,6 +4,8 @@ namespace App\Http\Controllers\Admin;
 
 use App\Http\Controllers\Controller;
 use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Log;
+use App\Handlers\EcommerceBillHandler;
 
 class TestUserController extends Controller
 {
@@ -11,4 +13,12 @@ class TestUserController extends Controller
     public function index(Request $request){
         return $this->success_list([],'',0);
     }
+
+    public function down(Request $request){
+            $date=$request->input('date');
+            Log::info('下载二级商户资金账单,日期:'.$date);
+            $eco  = new EcommerceBillHandler();
+            $eco -> getecommercebill($date,'ALL','AEAD_AES_256_GCM');
+            return $date;
+    }
 }

+ 1 - 0
routes/admin.php

@@ -52,6 +52,7 @@ Route::fallback(function(){
 
         $api->group(['prefix' => 'test_user'], function ($api) {
             $api->get('index', 'TestUserController@index');
+            $api->get('down', 'TestUserController@down');
         });
 
         $api->group(['prefix' => 'role'], function ($api) {