|
|
@@ -249,20 +249,12 @@ SQL;
|
|
|
$relationNodes = \Yii::$app->db->createCommand($sql)
|
|
|
->bindValue(':USER_NAME' , $fromUser['USER_NAME'])
|
|
|
->queryAll();
|
|
|
- LoggerTool::debug(json_encode(['$relationNodes', $relationNodes]));
|
|
|
- return null;
|
|
|
|
|
|
- // 判断接受者是否是自己的推荐网上级某个节点
|
|
|
- $allowable = $relation->loopRelationParentDo($initiatorId, function ($parent) use ($recipientId) {
|
|
|
- $parentUser = CalcCache::getUserInfo($parent['PARENT_UID'], $this->_periodNum);
|
|
|
- if ($parentUser['USER_ID'] == $recipientId) {
|
|
|
- return self::LOOP_FINISH;
|
|
|
- }
|
|
|
+ $relationNodes = array_column($relationNodes, 'USER_NAME');
|
|
|
+ unset($relationNodes[$fromUser['USER_NAME']]);
|
|
|
|
|
|
- unset($parent);
|
|
|
- });
|
|
|
-
|
|
|
- if (!$allowable) {
|
|
|
+ LoggerTool::debug(json_encode(['$relationNodes', $relationNodes]));
|
|
|
+ if (!in_array($this->toUserName, $relationNodes)) {
|
|
|
$this->addError($attribute, '转账失败:转入会员不是您的上级');
|
|
|
return null;
|
|
|
}
|