修改添加优惠卷即将过期提醒队列时间
This commit is contained in:
parent
47150086b4
commit
15a4794639
@ -154,20 +154,18 @@ class CouponService extends BaseService
|
||||
|
||||
try {
|
||||
// 添加优惠卷即将过期提醒队列
|
||||
if ($time > 60 * 60 * 24 * 2) {
|
||||
$time = 60 * 60 * 24 * 2;
|
||||
} else {
|
||||
if ($time > 60 * 60 * 5){
|
||||
$time = $time - 60 * 60 * 5;
|
||||
$time = floor($time * 0.25);
|
||||
|
||||
// 时间低于5小时,不进行过期提醒
|
||||
if ($time > 60 * 60 * 5){
|
||||
$message = new UserCouponExpiredNoticeDelayDirectProducer($data);
|
||||
$message->setDelayMs(1000 * $time);
|
||||
$producer = $this->container->get(Producer::class);
|
||||
$res = $producer->produce($message);
|
||||
if (!$res) {
|
||||
Log::getInstance("CouponService-GrantUserCoupon")->error("添加优惠卷即将过期提醒队列");
|
||||
}
|
||||
}
|
||||
$message = new UserCouponExpiredNoticeDelayDirectProducer($data);
|
||||
$message->setDelayMs(1000 * $time);
|
||||
$producer = $this->container->get(Producer::class);
|
||||
$res = $producer->produce($message);
|
||||
if (!$res) {
|
||||
Log::getInstance("CouponService-GrantUserCoupon")->error("添加优惠卷即将过期提醒队列");
|
||||
}
|
||||
|
||||
// 通知-患者-优惠卷发放
|
||||
$MessagePush = new MessagePush($user_id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user