diff --git a/app/common/repositories/system/merchant/MerchantIntentionRepository.php b/app/common/repositories/system/merchant/MerchantIntentionRepository.php index 07d5698e..01e912c5 100755 --- a/app/common/repositories/system/merchant/MerchantIntentionRepository.php +++ b/app/common/repositories/system/merchant/MerchantIntentionRepository.php @@ -120,6 +120,7 @@ class MerchantIntentionRepository extends BaseRepository $data['is_margin'] = $margin['is_margin'] ?? -1; $data['margin'] = $margin['margin'] ?? 0; $merData = []; + $smsData = []; if ($create) { $password = substr($intention['phone'], -6); $merData = [ @@ -204,7 +205,9 @@ class MerchantIntentionRepository extends BaseRepository Merchant::where('mer_id', $merId)->update(['business_status' => 2]); } } - Queue::push(SendSmsJob::class, ['tempId' => 'APPLY_MER_SUCCESS', 'id' => $smsData]); + if (!empty($smsData)) { + Queue::push(SendSmsJob::class, ['tempId' => 'APPLY_MER_SUCCESS', 'id' => $smsData]); + } } else { Queue::push(SendSmsJob::class, ['tempId' => 'APPLY_MER_FAIL', 'id' => $smsData]); }