定时任务添加日志

This commit is contained in:
luofei 2024-02-23 09:18:55 +08:00
parent 5032e5cbfa
commit 8e4dd95120

View File

@ -9,6 +9,7 @@ use app\common\model\system\merchant\Merchant;
use app\common\model\user\UserBill; use app\common\model\user\UserBill;
use crmeb\interfaces\ListenerInterface; use crmeb\interfaces\ListenerInterface;
use crmeb\services\TimerService; use crmeb\services\TimerService;
use think\facade\Log;
/** /**
* 定时任务:激活商户补贴 * 定时任务:激活商户补贴
@ -18,7 +19,8 @@ class ActivateConsumptionListen extends TimerService implements ListenerInterfac
public function handle($event): void public function handle($event): void
{ {
$this->tick(1000 * 60 * 10, function () { $this->tick(1000 * 60, function () {
Log::info('定时任务:激活商户补贴');
$couponId = StoreConsumption::where('type', StoreConsumption::TYPE_RECHARGE)->value('coupon_id'); $couponId = StoreConsumption::where('type', StoreConsumption::TYPE_RECHARGE)->value('coupon_id');
if (empty($couponId)) { if (empty($couponId)) {
return; return;