32 lines
748 B
PHP
32 lines
748 B
PHP
|
|
<?php
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 文件功能:每日批量处理婚姻亲密度增加(每日时间奖励)
|
|||
|
|
*
|
|||
|
|
* 每天 00:05 执行一次,给所有 married 状态的婚姻对各加 intimacy_daily_time 积分。
|
|||
|
|
* 同时同步 marriages.online_minutes 从 Redis 计数器(如有)。
|
|||
|
|
*
|
|||
|
|
* @author ChatRoom Laravel
|
|||
|
|
*
|
|||
|
|
* @version 1.0.0
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
namespace App\Jobs;
|
|||
|
|
|
|||
|
|
use App\Services\MarriageIntimacyService;
|
|||
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|||
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|||
|
|
|
|||
|
|
class ProcessMarriageIntimacy implements ShouldQueue
|
|||
|
|
{
|
|||
|
|
use Queueable;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 执行 Job:批量添加每日时间亲密度。
|
|||
|
|
*/
|
|||
|
|
public function handle(MarriageIntimacyService $intimacy): void
|
|||
|
|
{
|
|||
|
|
$intimacy->dailyBatch();
|
|||
|
|
}
|
|||
|
|
}
|