auto delete
This commit is contained in:
24
script/account/auto_delete.php
Normal file
24
script/account/auto_delete.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$is_script = 1;
|
||||
include_once __DIR__ . '/../../index.php';
|
||||
|
||||
|
||||
use app\api\model\ProductAccount;
|
||||
|
||||
$account_model = new ProductAccount;
|
||||
$where = [
|
||||
'PackageName' => '测试卡',
|
||||
'EndTime' => ['<',date('Y-m-d H:i:s')],
|
||||
];
|
||||
|
||||
$update_data = [
|
||||
'DeleteTag' => 1
|
||||
];
|
||||
|
||||
$where_month = [
|
||||
'EndTime' => ['<',date("Y-m-d H:i:s", strtotime("-1 month"))]
|
||||
];
|
||||
|
||||
$account_model->updateOne($where,$update_data);
|
||||
$account_model->updateOne($where_month,$update_data);
|
||||
Reference in New Issue
Block a user