|
|
@@ -513,44 +513,44 @@ class DeclarationForm extends Model
|
|
|
$conUser = $this->_tempParentUser[$this->conUserName];
|
|
|
|
|
|
// 开拓人
|
|
|
- if(!isset($this->_tempParentUser[$this->recUserName])){
|
|
|
- $recUserTemp = UserInfo::findOneAsArray('USER_NAME=:USER_NAME', [':USER_NAME' => $this->recUserName]);
|
|
|
- if(!$recUserTemp){
|
|
|
-// $this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
|
|
|
- $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
|
|
|
- return ;
|
|
|
- }
|
|
|
- $recUserTemp['CON_NUM'] = UserNetwork::firstFloorChildNum($recUserTemp['USER_ID']);
|
|
|
- $recUserTemp['REC_NUM'] = UserRelation::firstFloorChildNum($recUserTemp['USER_ID']);
|
|
|
- $this->_tempParentUser[$this->recUserName] = [
|
|
|
- 'USER_NAME' => $this->recUserName,
|
|
|
- //'ZC_PV' => $recUserTemp['ZC_PV'],
|
|
|
- 'CON_USER_NAME' => Info::getUserNameByUserId($recUserTemp['CON_UID']),
|
|
|
- 'REC_USER_NAME' => Info::getUserNameByUserId($recUserTemp['REC_UID']),
|
|
|
- 'CON_NUM' => $recUserTemp['CON_NUM'],
|
|
|
- 'REC_NUM' => $recUserTemp['REC_NUM'],
|
|
|
- 'SYSTEM_ID' => $recUserTemp['SYSTEM_ID'],
|
|
|
- 'LOCATION' => UserNetwork::getLocation($recUserTemp['USER_ID'], $recUserTemp['CON_UID']),
|
|
|
- ];
|
|
|
- // 把该会员下面的5个区是否存在会员都付上
|
|
|
- for($i=1;$i<=5;$i++){
|
|
|
- $this->_tempParentUser[$this->recUserName]["LOCATION$i"] = UserNetwork::issetUserInLocation($recUserTemp['USER_ID'], $i);
|
|
|
- }
|
|
|
- }
|
|
|
- $recUser = $this->_tempParentUser[$this->recUserName];
|
|
|
+// if(!isset($this->_tempParentUser[$this->recUserName])){
|
|
|
+// $recUserTemp = UserInfo::findOneAsArray('USER_NAME=:USER_NAME', [':USER_NAME' => $this->recUserName]);
|
|
|
+// if(!$recUserTemp){
|
|
|
+//// $this->addError($attribute, '为'.$this->insertUserName.'报单,开拓人'.$this->recUserName.'不存在');
|
|
|
+// $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->recUserName.'not in exist');
|
|
|
+// return ;
|
|
|
+// }
|
|
|
+// $recUserTemp['CON_NUM'] = UserNetwork::firstFloorChildNum($recUserTemp['USER_ID']);
|
|
|
+// $recUserTemp['REC_NUM'] = UserRelation::firstFloorChildNum($recUserTemp['USER_ID']);
|
|
|
+// $this->_tempParentUser[$this->recUserName] = [
|
|
|
+// 'USER_NAME' => $this->recUserName,
|
|
|
+// //'ZC_PV' => $recUserTemp['ZC_PV'],
|
|
|
+// 'CON_USER_NAME' => Info::getUserNameByUserId($recUserTemp['CON_UID']),
|
|
|
+// 'REC_USER_NAME' => Info::getUserNameByUserId($recUserTemp['REC_UID']),
|
|
|
+// 'CON_NUM' => $recUserTemp['CON_NUM'],
|
|
|
+// 'REC_NUM' => $recUserTemp['REC_NUM'],
|
|
|
+// 'SYSTEM_ID' => $recUserTemp['SYSTEM_ID'],
|
|
|
+// 'LOCATION' => UserNetwork::getLocation($recUserTemp['USER_ID'], $recUserTemp['CON_UID']),
|
|
|
+// ];
|
|
|
+// // 把该会员下面的5个区是否存在会员都付上
|
|
|
+// for($i=1;$i<=5;$i++){
|
|
|
+// $this->_tempParentUser[$this->recUserName]["LOCATION$i"] = UserNetwork::issetUserInLocation($recUserTemp['USER_ID'], $i);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// $recUser = $this->_tempParentUser[$this->recUserName];
|
|
|
|
|
|
// 判断接点会员的下级会员是否大于三个,如果大于三个则不允许
|
|
|
- if($conUser['CON_NUM'] >= 3){
|
|
|
-// $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'下级点位已满');
|
|
|
- $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'lower level is full');
|
|
|
- return;
|
|
|
- }
|
|
|
- // 判断指导老师相应的区位是否已满
|
|
|
- if($conUser['LOCATION'.$this->location]){
|
|
|
-// $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'该市场已存在会员');
|
|
|
- $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'Members already exist in this market');
|
|
|
- return;
|
|
|
- }
|
|
|
+// if($conUser['CON_NUM'] >= 3){
|
|
|
+//// $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'下级点位已满');
|
|
|
+// $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'lower level is full');
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// // 判断指导老师相应的区位是否已满
|
|
|
+// if($conUser['LOCATION'.$this->location]){
|
|
|
+//// $this->addError($attribute, '为'.$this->insertUserName.'报单,指导老师'.$this->conUserName.'该市场已存在会员');
|
|
|
+// $this->addError($attribute, 'To'.$this->insertUserName.'Entry, Sponsor'.$this->conUserName.'Members already exist in this market');
|
|
|
+// return;
|
|
|
+// }
|
|
|
// if($conUser['CON_NUM'] == 0 && $this->location != 1){
|
|
|
// $this->addError($attribute, '为'.$this->insertUserName.'报单,市场必须为指导老师'.$this->conUserName.'下第一市场');
|
|
|
// return;
|
|
|
@@ -562,21 +562,21 @@ class DeclarationForm extends Model
|
|
|
// $this->_tempParentUser[$this->recUserName]['REC_NUM'] += 1;
|
|
|
|
|
|
// 把自己加入到临时上级会员数组中
|
|
|
- $this->_tempParentUser[$this->insertUserName] = [
|
|
|
- 'USER_NAME' => $this->insertUserName,
|
|
|
- //'ZC_PV' => $this->decPv,
|
|
|
- 'CON_USER_NAME' => $this->conUserName,
|
|
|
- 'REC_USER_NAME' => $this->recUserName,
|
|
|
- 'CON_NUM' => 0,
|
|
|
- 'REC_NUM' => 0,
|
|
|
- 'SYSTEM_ID' => $recUser['SYSTEM_ID'],
|
|
|
- 'LOCATION' => $this->location,
|
|
|
- 'LOCATION1' => 0,
|
|
|
- 'LOCATION2' => 0,
|
|
|
- 'LOCATION3' => 0,
|
|
|
- 'LOCATION4' => 0,
|
|
|
- 'LOCATION5' => 0,
|
|
|
- ];
|
|
|
+// $this->_tempParentUser[$this->insertUserName] = [
|
|
|
+// 'USER_NAME' => $this->insertUserName,
|
|
|
+// //'ZC_PV' => $this->decPv,
|
|
|
+// 'CON_USER_NAME' => $this->conUserName,
|
|
|
+// 'REC_USER_NAME' => $this->recUserName,
|
|
|
+// 'CON_NUM' => 0,
|
|
|
+// 'REC_NUM' => 0,
|
|
|
+// 'SYSTEM_ID' => $recUser['SYSTEM_ID'],
|
|
|
+// 'LOCATION' => $this->location,
|
|
|
+// 'LOCATION1' => 0,
|
|
|
+// 'LOCATION2' => 0,
|
|
|
+// 'LOCATION3' => 0,
|
|
|
+// 'LOCATION4' => 0,
|
|
|
+// 'LOCATION5' => 0,
|
|
|
+// ];
|
|
|
}
|
|
|
}
|
|
|
|