ShuanghongS vor 3 Monaten
Ursprung
Commit
ce342c0351
1 geänderte Dateien mit 9 neuen und 2 gelöschten Zeilen
  1. 9 2
      utils/common.class.php

+ 9 - 2
utils/common.class.php

@@ -3786,13 +3786,15 @@ class common {
             $_contact_type = common::check_input($_POST['contact_type'][$key]);
             $_create_user = common::check_input($_POST['create_user'][$key]);
 
-            $uniqueAC =array();
             if ($_contact_type ==  "Add"){
+                $uniqueAC =array();
                 foreach($consignee_id as $ck => $_consignee_id){
                     $_add_create_user = "Online_D_Address";
-                    if(is_array($_consignee_id,$uniqueAC)){
+                    if(utils::in_array($_consignee_id,$uniqueAC)){
                         continue;
                     }
+                    $uniqueAC[] = $_consignee_id;
+
                     $_sync_key = common::uuid();
                     $_from_station = "";
                     $addressSql .= "INSERT INTO public.contacts_address_online(
@@ -3891,7 +3893,12 @@ class common {
                 continue;
             }
 
+            $uniqueAC =array();
             foreach($address_country as $ck => $_country){
+                if(utils::in_array($_country,$uniqueAC)){
+                    continue;
+                }
+                $uniqueAC[] = $_country;
                 //如果需要新加的时候 用户固定名称,用作标记   //contact_person,contact_number  '$_contact_person','$_contact_number'
                 $_add_create_user = "Online_D_Address";
                 if ($_contact_type == "Add"){