parent
7413d760dc
commit
47dd821f1f
packages/bydauto/src
@ -115,10 +115,18 @@ public function action_push2contact()
|
||||
->get();
|
||||
|
||||
// 根据手机号码去除重
|
||||
$items = $items->unique('mobile');
|
||||
|
||||
// 根据已发送的手机号码去重
|
||||
$items = $items->filter(function ($item) use ($sendItems) {
|
||||
return !in_array($item->mobile, $sendItems);
|
||||
});
|
||||
|
||||
$items = $items->sortBy('id')->take(157);
|
||||
|
||||
$confirm = $this->confirm("共有 {$items->count()} 条数据,是否继续?");
|
||||
if (!$confirm) return Command::SUCCESS;
|
||||
|
||||
// 联系人
|
||||
$contacts = Contact::query()
|
||||
->where('status', Contact::STATUS_PUBLISHED)
|
||||
|
@ -167,11 +167,11 @@ public static function syncFromAliPromote($data, $pageId)
|
||||
$model = new static(['source' => 'alipromote:' . $pageId, 'rawdata' => $data, 'external_id' => $externalId]);
|
||||
foreach ($data['property_list'] as $prop) {
|
||||
// 手机号
|
||||
if ($prop['key'] === 'phone') {
|
||||
if ($prop['key'] === 'phone' || $prop['key'] === '手机号') {
|
||||
$model->mobile = $prop['value'];
|
||||
}
|
||||
// 姓名
|
||||
if ($prop['key'] === 'name') {
|
||||
if ($prop['key'] === 'name' || $prop['key'] === '姓名') {
|
||||
$model->name = $prop['value'];
|
||||
}
|
||||
// // 意向车型
|
||||
|
Loading…
Reference in New Issue
Block a user