Преглед на файлове

feat: NG-15: 新会员注册时增加国家与语言选项.

zhangl преди 1 година
родител
ревизия
516354a58b
променени са 3 файла, в които са добавени 12 реда и са изтрити 12 реда
  1. 6 6
      common/models/forms/DeclarationForm.php
  2. 4 4
      common/models/forms/UserForm.php
  3. 2 2
      frontendApi/modules/v1/controllers/UserController.php

+ 6 - 6
common/models/forms/DeclarationForm.php

@@ -136,8 +136,8 @@ class DeclarationForm extends Model
             [['insertUserName'], 'isCanAddUser'],
             [['decUserName'], 'issetDec'],
             [['conUserName'], 'isConUserName'],
-            [['recUserName'], 'isRecUserName'],
-            [['location'], 'isLocation'],
+//            [['recUserName'], 'isRecUserName'],
+//            [['location'], 'isLocation'],
 //            [['insertUserIdCard'], 'isSameSystem'],
         ];
     }
@@ -210,12 +210,12 @@ class DeclarationForm extends Model
                 $this->addError($attribute, Yii::t('app', 'stockistDoesNotExist'));
                 return false;
             } else {
-                if ($this->decType !== 'ba') {
+//                if ($this->decType !== 'ba') {
                     // 判断报单中心是否在新加入会员的安置网上级中
-                    $this->loopFindParentToNetwork($this->insertUserName);
+//                    $this->loopFindParentToNetwork($this->insertUserName);
                     //反转数组,in_array搜索错误
                     //in_array($this->decUserName, $this->_tempNetworkParentUser[$this->insertUserName]);
-                    $flipParent = array_flip(array_filter($this->_tempNetworkParentUser[$this->insertUserName]));
+//                    $flipParent = array_flip(array_filter($this->_tempNetworkParentUser[$this->insertUserName]));
 //            var_dump($flipParent);
 //            echo $this->insertUserName.'=='.$this->decUserName;
 //            exit;
@@ -224,7 +224,7 @@ class DeclarationForm extends Model
 //                        $this->addError($attribute, 'To' . $this->insertUserName . 'Entry, Stockist' . $this->decUserName . 'not in exist' . $this->insertUserName . 'in the placement superiors');
 //                        return;
 //                    }
-                }
+//                }
                 $this->_decId = $decUser['ID'];
             }
         }

+ 4 - 4
common/models/forms/UserForm.php

@@ -297,7 +297,7 @@ class UserForm extends Model
         $zcPv = $this->zcPv;
         $conUid = $this->_conUid;
         $recUid = $this->_recUid;
-        $location = $this->location;
+//        $location = $this->location;
 
 //        $db = \Yii::$app->db;
 //        $transaction = $db->beginTransaction();
@@ -327,11 +327,11 @@ class UserForm extends Model
                 throw new Exception('会员信息更新失败');
             }
             // 安置关系
-            $this->_addToNetwork();
+//            $this->_addToNetwork();
             // 开拓关系
             $this->_addToRelation();
             // 把会员的网络深度也追加上
-            $userInfoModel->NETWORK_DEEP = $this->_conTopDeep;
+            $userInfoModel->NETWORK_DEEP = $this->_recTopDeep;
             $userInfoModel->RELATION_DEEP = $this->_recTopDeep;
             if(!$userInfoModel->save()){
                 throw new Exception('会员网络深度更新失败');
@@ -384,7 +384,7 @@ class UserForm extends Model
             UserInfo::insertOne($insertData);
             unset($insertData);
             // 安置关系
-            $this->_addToNetworkForImport();
+//            $this->_addToNetworkForImport();
             // 开拓关系
             //$this->_addToRelationForImport();
             // 把会员的网络深度也追加上

+ 2 - 2
frontendApi/modules/v1/controllers/UserController.php

@@ -513,8 +513,8 @@ class UserController extends BaseController {
             $post['province'] = $post['province'] ? :1;
             $post['city'] = $post['city'] ? :1;
             $post['county'] = $post['county'] ? :1;
-            $post['conUserName'] = trim($post['conUserName']);
-            $post['recUserName'] = trim($post['recUserName']);
+            $post['conUserName'] = trim($post['recUserName']);  // 推荐人编号 trim($post['conUserName']);
+            $post['recUserName'] = trim($post['recUserName']);  // 实际推荐人编号(原安置人编号) trim($post['recUserName']);
             $post['cityName'] = trim($post['cityName']);
             $post['lgaName'] = trim($post['lgaName']);