This commit is contained in:
		
							parent
							
								
									00106c3110
								
							
						
					
					
						commit
						77e2e4fdb2
					
				| @ -65,7 +65,7 @@ public function action_push2contact() | ||||
| 
 | ||||
|         // 去除中文名字长度大于3的数据
 | ||||
|         // $items = $items->filter(function ($item) {
 | ||||
|         //     return !$this->filterDirtyName($item->name);
 | ||||
|         //     return !$this->isDirtyName($item->name);
 | ||||
|         // });
 | ||||
| 
 | ||||
|         // 联系人
 | ||||
| @ -81,7 +81,7 @@ public function action_push2contact() | ||||
| 
 | ||||
|         // 分配数据
 | ||||
|         foreach ($items as $item) { | ||||
|             if (mb_strlen($item->name) >= 6) { | ||||
|             if ($this->isDirtyName($item->name)) { | ||||
|                 info("试驾数据 {$item->id} 姓名异常 {$item->name}"); | ||||
|                 $this->info("试驾数据 {$item->id} 姓名异常 {$item->name}"); | ||||
|                 $item->update(['status' => Testdrive::STATUS_REJECTED]); | ||||
| @ -94,8 +94,8 @@ public function action_push2contact() | ||||
|             } else { | ||||
|                 $sendList[$contact->id][] = $item; | ||||
|             } | ||||
|             info("分配试驾数据 {$item->id} 给联系人 {$contact->id}"); | ||||
|             $this->info("分配试驾数据 {$item->id} 给联系人 {$contact->id}"); | ||||
|             // info("分配试驾数据 {$item->id} 给联系人 {$contact->id}");
 | ||||
|             // $this->info("分配试驾数据 {$item->id} 给联系人 {$contact->id}");
 | ||||
|             Activity::create([ | ||||
|                 'name' => '试驾通知', | ||||
|                 'content' => ['testdrive' => $item->id, 'contact' => $contact->id], | ||||
| @ -143,7 +143,7 @@ public function action_contact_add() | ||||
|         $this->info('Contact added'); | ||||
|     } | ||||
| 
 | ||||
|     protected function filterDirtyName($str, $max = 3) | ||||
|     protected function isDirtyName($str, $max = 3) | ||||
|     { | ||||
|         if (!preg_match('/^[\x{4e00}-\x{9fa5}]+$/u', $str)) { | ||||
|             return false; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user