mirror of
https://github.com/v2board/v2board.git
synced 2025-02-11 07:59:11 +08:00
update: check order php env memory limit
This commit is contained in:
parent
078dfbf339
commit
6509091e4f
@ -42,6 +42,7 @@ class CheckOrder extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
ini_set('memory_limit', -1);
|
||||||
$orders = Order::whereIn('status', [0, 1])
|
$orders = Order::whereIn('status', [0, 1])
|
||||||
->get();
|
->get();
|
||||||
foreach ($orders as $item) {
|
foreach ($orders as $item) {
|
||||||
|
@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
|||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class ResetTraffic extends Command
|
class ResetTraffic extends Command
|
||||||
{
|
{
|
||||||
@ -41,6 +42,7 @@ class ResetTraffic extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
DB::beginTransaction();
|
||||||
$resetTrafficMethod = config('v2board.reset_traffic_method', 0);
|
$resetTrafficMethod = config('v2board.reset_traffic_method', 0);
|
||||||
switch ((int)$resetTrafficMethod) {
|
switch ((int)$resetTrafficMethod) {
|
||||||
// 1 a month
|
// 1 a month
|
||||||
@ -52,6 +54,7 @@ class ResetTraffic extends Command
|
|||||||
$this->resetByExpireDay();
|
$this->resetByExpireDay();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
DB::commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function resetByMonthFirstDay():void
|
private function resetByMonthFirstDay():void
|
||||||
|
@ -411,7 +411,7 @@ ALTER TABLE `v2_order`
|
|||||||
|
|
||||||
ALTER TABLE `v2_payment`
|
ALTER TABLE `v2_payment`
|
||||||
ADD `uuid` char(32) NOT NULL AFTER `id`;
|
ADD `uuid` char(32) NOT NULL AFTER `id`;
|
||||||
|
-- 1.5.2
|
||||||
ALTER TABLE `v2_user`
|
ALTER TABLE `v2_user`
|
||||||
ADD `deleted_at` int(11) NULL AFTER `updated_at`;
|
ADD `deleted_at` int(11) NULL AFTER `updated_at`;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user