no message
This commit is contained in:
parent
916839cb1e
commit
3ebfc0b97a
@ -1117,6 +1117,7 @@ final class Cron
|
|||||||
|
|
||||||
// 检查自动续订是否开启
|
// 检查自动续订是否开启
|
||||||
$oUser = User::where("id", $oPlanQueue->user_id)->first(); // * 数据
|
$oUser = User::where("id", $oPlanQueue->user_id)->first(); // * 数据
|
||||||
|
|
||||||
if ($oUser->autorenew != 1) {
|
if ($oUser->autorenew != 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1143,6 +1144,9 @@ final class Cron
|
|||||||
$oUser->save();
|
$oUser->save();
|
||||||
|
|
||||||
// todo 发站内信 成功失败都发
|
// todo 发站内信 成功失败都发
|
||||||
|
$text = "钱包余额不足,自动续订失败。";
|
||||||
|
Notification::notifyUser($oUser, $_ENV['appName'] . ' - 自动续订失败', $text);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1182,6 +1186,9 @@ final class Cron
|
|||||||
$invoice->money_use = $oPlanActivated->user_price;
|
$invoice->money_use = $oPlanActivated->user_price;
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
|
|
||||||
|
$text = "自动续订成功,钱包金额扣除".$oPlanActivated->user_price."元,还剩".$iUserMoneyNew."元。";
|
||||||
|
Notification::notifyUser($oUser, $_ENV['appName'] . ' - 自动续订成功', $text);
|
||||||
|
|
||||||
$oPlanQueue->_delete();
|
$oPlanQueue->_delete();
|
||||||
|
|
||||||
self::_helper_log("用户".$oUser->id."续订购买套餐成功");
|
self::_helper_log("用户".$oUser->id."续订购买套餐成功");
|
||||||
@ -1259,11 +1266,13 @@ final class Cron
|
|||||||
$oUser->class_expire = $iToExpire;
|
$oUser->class_expire = $iToExpire;
|
||||||
$oUser->save();
|
$oUser->save();
|
||||||
|
|
||||||
try {
|
Notification::notifyUser($oUser, $_ENV['appName'] . '-您的套餐已经过期', $text);
|
||||||
Notification::notifyUser($oUser, $_ENV['appName'] . '-您的套餐已经过期', $text);
|
|
||||||
} catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
// try {
|
||||||
echo $e->getMessage() . PHP_EOL;
|
// Notification::notifyUser($oUser, $_ENV['appName'] . '-您的套餐已经过期', $text);
|
||||||
}
|
// } catch (GuzzleException|ClientExceptionInterface|TelegramSDKException $e) {
|
||||||
|
// echo $e->getMessage() . PHP_EOL;
|
||||||
|
// }
|
||||||
//// end
|
//// end
|
||||||
|
|
||||||
$oPlanExpireQueue->delete();
|
$oPlanExpireQueue->delete();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user