|
|
@@ -18,6 +18,9 @@ use Carbon\Carbon;
|
|
18
|
18
|
use think\console\Command;
|
|
19
|
19
|
use think\console\Input;
|
|
20
|
20
|
use think\console\Output;
|
|
|
21
|
+use think\db\exception\DataNotFoundException;
|
|
|
22
|
+use think\db\exception\DbException;
|
|
|
23
|
+use think\db\exception\ModelNotFoundException;
|
|
21
|
24
|
use think\Exception;
|
|
22
|
25
|
use think\facade\Db;
|
|
23
|
26
|
use think\facade\Log;
|
|
|
@@ -64,7 +67,7 @@ class PensionTasks extends Command
|
|
64
|
67
|
// $this->doThridVipOrderGzc($nowTime, $timeLimit = 30);
|
|
65
|
68
|
// $this->doThridDyOrderGzc($nowTime, $timeLimit = 30);
|
|
66
|
69
|
// $this->doThridHfOrderGzc($nowTime, $timeLimit = 30);
|
|
67
|
|
-// $this->billGzcAdd($nowTime);
|
|
|
70
|
+ $this->billGzcAdd($nowTime);
|
|
68
|
71
|
//升级
|
|
69
|
72
|
// $this -> doUpgrade();
|
|
70
|
73
|
} catch (\Throwable $e) {
|
|
|
@@ -87,10 +90,23 @@ class PensionTasks extends Command
|
|
87
|
90
|
$OrderGzcRepository = app()->make(OrderGzcRepository::class);
|
|
88
|
91
|
$OrderMerchantRepository = app()->make(OrderMerchantRepository::class);
|
|
89
|
92
|
$StoreOrderRepository = app()->make(StoreOrderRepository::class);
|
|
|
93
|
+ $testUserIdList = [];
|
|
|
94
|
+ /** @var UserRepository $userRepository */
|
|
|
95
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
96
|
+ try {
|
|
|
97
|
+ $userIdData = $userRepository->selectWhere(['test_user' => 1], 'uid')->toArray();
|
|
|
98
|
+ if (!empty($userIdData)) {
|
|
|
99
|
+ $testUserIdList = array_column($userIdData, 'uid');
|
|
|
100
|
+ }
|
|
|
101
|
+ } catch (DataNotFoundException|ModelNotFoundException|DbException $e) {
|
|
|
102
|
+
|
|
|
103
|
+ }
|
|
|
104
|
+
|
|
90
|
105
|
$cursor = Db::name('user_bill')
|
|
91
|
106
|
->where('status', 1)
|
|
92
|
107
|
->where('is_gzc', 0)
|
|
93
|
108
|
->where('commission_type', 5)
|
|
|
109
|
+ ->whereNotIn('uid', $testUserIdList)
|
|
94
|
110
|
->select()->toArray();
|
|
95
|
111
|
if($cursor) {
|
|
96
|
112
|
foreach ($cursor as $bill) {
|