Browse Source

客户批量打标签 调试

shensong00 2 weeks ago
parent
commit
08858ac187
1 changed files with 5 additions and 4 deletions
  1. 5 4
      app/Console/Commands/CorpInformation/BatchMarkTagNew.php

+ 5 - 4
app/Console/Commands/CorpInformation/BatchMarkTagNew.php

@@ -216,14 +216,15 @@ class BatchMarkTagNew extends Command
216 216
                         ->offset(($page - 1) * $limit)->limit($limit)->get();
217 217
                     Log::logInfo('初始客户列表', ['user_id' => $userId, 'customer_list' => $customerList->toArray()], $this->logName);
218 218
 
219
-                    $userFilterCustomerList = $newFilterCustomerList[$userId]['list'] ?? [];
219
+                    $userFilterCustomerList = $newFilterCustomerList[$userId]['list'][0] ?? [];
220 220
                     Log::logInfo('待过滤客户列表', ['user_id' => $userId, 'customer_list' => $userFilterCustomerList], $this->logName);
221 221
                     if (!empty($userFilterCustomerList)) {
222
-                        $newCustomerList = $this->filterCustomerList($customerList->toArray(), $userFilterCustomerList);
222
+//                        $newCustomerList = $this->filterCustomerList($customerList->toArray(), $userFilterCustomerList);
223
+                        $newCustomerList = $customerList->whereNotIn('customer_id', $userFilterCustomerList)->all();
223 224
                     } else {
224
-                        $newCustomerList = $customerList->toArray();
225
+                        $newCustomerList = $customerList->all();
225 226
                     }
226
-                    Log::logInfo('过滤后客户列表', [$newCustomerList], $this->logName);
227
+                    Log::logInfo('过滤后客户列表', ['user_id' => $userId, 'customer_list' => json_decode(json_encode($newCustomerList),1)], $this->logName);
227 228
 
228 229
 //                $userExternalUserIdList = array_column($newCustomerList, 'external_userid');
229 230
 //                $externalUserIdArr = array_chunk($userExternalUserIdList, $this->limit);