修复订单爬虫不发送短信的 bug,原因:config(app.debug) 返回字符串 false

This commit is contained in:
liuyuhang 2024-07-21 22:20:01 +08:00
parent 09f08a3598
commit ed1e344f9c
2 changed files with 2 additions and 2 deletions

View File

@ -453,7 +453,7 @@ class SpiderDy extends Command
private function sms($admin_id, $order)
{
$user = Admins::cache(true)->where('id', $admin_id)->find();
if (!config('app.debug', true) && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
if ((!config('app.debug', true) || config('app.debug', true) === 'false') && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
echo "发送短信\n";
print_r([$order->mobile, 261607, ['title' => $order->product_name, 'mobile' => $user->mobile]]);
$has = Blacks::where('mobile', $order->mobile)->find();

View File

@ -487,7 +487,7 @@ class SpiderMt extends Command
private function sms($admin_id, $order)
{
$user = Admins::cache(true)->where('id', $admin_id)->find();
if (!config('app.debug', true) && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
if ((!config('app.debug', true) || config('app.debug', true) === 'false') && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
echo "发送短信\n";
print_r([$order->mobile, 261607, ['title' => $order->product_name, 'mobile' => $user->mobile]]);
$has = Blacks::where('mobile', $order->mobile)->find();