torrent list cancel join category

This commit is contained in:
xiaomlove
2023-07-06 03:23:28 +08:00
parent 792632306e
commit bbce67a612
9 changed files with 67 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ class CalculateUserSeedBonus implements ShouldQueue
public $tries = 1;
public $timeout = 600;
public $timeout = 3600;
/**
* Execute the job.

View File

@@ -274,5 +274,21 @@ class SearchBox extends NexusModel
return implode('', $options);
}
public static function listCategoryId($searchBoxId, $glue = null): array|string|null
{
static $results = null;
if (is_null($results)) {
$results = [];
$res = genrelist($searchBoxId);
foreach ($res as $item) {
$results[] = $item['id'];
}
}
if (!is_null($glue)) {
$results = implode($glue, $results);
}
return $results;
}
}

View File

@@ -126,6 +126,7 @@ class ClaimRepository extends BaseRepository
$startOfThisMonth = Carbon::now()->startOfMonth();
$query = Claim::query()
->select(['uid'])
->where("created_at", "<", $startOfThisMonth)
->where(function (Builder $query) use ($startOfThisMonth) {
$query->where('last_settle_at', '<', $startOfThisMonth)->orWhereNull('last_settle_at');
})