修改添加优惠卷即将过期提醒队列时间

This commit is contained in:
wucongxing 2023-11-09 14:40:57 +08:00
parent 47150086b4
commit 15a4794639

View File

@ -154,13 +154,10 @@ class CouponService extends BaseService
try { try {
// 添加优惠卷即将过期提醒队列 // 添加优惠卷即将过期提醒队列
if ($time > 60 * 60 * 24 * 2) { $time = floor($time * 0.25);
$time = 60 * 60 * 24 * 2;
} else { // 时间低于5小时不进行过期提醒
if ($time > 60 * 60 * 5){ if ($time > 60 * 60 * 5){
$time = $time - 60 * 60 * 5;
}
}
$message = new UserCouponExpiredNoticeDelayDirectProducer($data); $message = new UserCouponExpiredNoticeDelayDirectProducer($data);
$message->setDelayMs(1000 * $time); $message->setDelayMs(1000 * $time);
$producer = $this->container->get(Producer::class); $producer = $this->container->get(Producer::class);
@ -168,6 +165,7 @@ class CouponService extends BaseService
if (!$res) { if (!$res) {
Log::getInstance("CouponService-GrantUserCoupon")->error("添加优惠卷即将过期提醒队列"); Log::getInstance("CouponService-GrantUserCoupon")->error("添加优惠卷即将过期提醒队列");
} }
}
// 通知-患者-优惠卷发放 // 通知-患者-优惠卷发放
$MessagePush = new MessagePush($user_id); $MessagePush = new MessagePush($user_id);