Ver Fonte

Merge branch 'liuzj-permission-dev' into test

liuzejian há 1 ano atrás
pai
commit
0023a3c67c

+ 17 - 0
modules/ContentManage/Http/Controllers/CpSubscribeStatisticDataController.php

@@ -48,6 +48,17 @@ class CpSubscribeStatisticDataController extends CatchController
 
         $cpName = $this->getUserCpName() ?? $cpName;
 
+        /**
+         * 临时代码,
+         */
+        $sql = DB::table('cp_subscribe_statistic_data')
+            ->where('id', -1);
+        if($isExport) {
+            return $sql->get();
+        } else {
+            return $sql->paginate($perPage);
+        }
+
 
         $sql = DB::table('cp_subscribe_statistic_data as statistic')
             ->leftJoin('books as book', 'statistic.bid' , 'book.id')
@@ -115,6 +126,12 @@ class CpSubscribeStatisticDataController extends CatchController
 
         $cpName = $this->getUserCpName() ?? $cpName;
 
+        return [
+            'yesterday_total_coins' => 0,
+            'yesterday_available_amount' => 0,
+            'yesterday_final_amount' => 0,
+        ];
+
         $res = DB::table('cp_subscribe_statistic_data as statistic')
             ->leftJoin('books as book', 'statistic.bid' , 'book.id')
             ->when($bookName, function ($query, $bookName) {

+ 3 - 2
tests/Callback/Http/Controllers/JuliangAccountControllerTest.php

@@ -14,8 +14,8 @@ class JuliangAccountControllerTest extends UsedTestCase
         $res = $this->withHeaders([
             'Authorization' => 'Bearer '. $this->token,
         ])->json('post','http://localhost/api/callback/juliangAccount/addAccount', [
-            'account_id' => 1234568,
-            'account_name' => 'jkljlkj',
+            'account_id' => 123456810,
+            'account_name' => 'jkljlkj-10',
             'state' => 1,
             'protect_num' => 3,
             'default_rate' => 50,
@@ -25,6 +25,7 @@ class JuliangAccountControllerTest extends UsedTestCase
             ],
             'min_money' => 20,
             'max_money' => 50,
+            'callback_state' => 1
         ]);
 
         $res->dump();

+ 1 - 1
tests/UsedTestCase.php

@@ -17,7 +17,7 @@ abstract class UsedTestCase extends BaseTestCase
             'remember' => false,
 //            'email' => 'xiaoli@qq.com',
             'password' => 'catchadmin',
-            'email' => 'aa@test.com',
+            'email' => 'aa4@test.com',
         ])->json();
         $this->token = $tokenInfo['data']['token'];
     }