|
|
|
@ -377,15 +377,18 @@ class PromoteModel extends Model{
|
|
|
|
|
$result = [];
|
|
|
|
|
switch ($level) {
|
|
|
|
|
case 1: // 会长
|
|
|
|
|
$result = $this->field("id, nickname")->where("grand_id = 0 and parent_id = 0")->select();
|
|
|
|
|
$result = $this->field("id, nickname, account, real_name")->where("grand_id = 0 and parent_id = 0")->select();
|
|
|
|
|
break;
|
|
|
|
|
case 2: // 组长
|
|
|
|
|
$result = $this->field("id, nickname")->where("grand_id = 0 and parent_id > 0")->select();
|
|
|
|
|
$result = $this->field("id, nickname, account, real_name")->where("grand_id = 0 and parent_id > 0")->select();
|
|
|
|
|
break;
|
|
|
|
|
case 3: //组员
|
|
|
|
|
$result = $this->field("id, nickname")->where("parent_id > 0 and grand_id > 0")->select();
|
|
|
|
|
$result = $this->field("id, nickname, account, real_name")->where("parent_id > 0 and grand_id > 0")->select();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
foreach ($result as &$item) {
|
|
|
|
|
$item['nickname'] = "{$item['account']}({$item['real_name']})";
|
|
|
|
|
}
|
|
|
|
|
return $result;
|
|
|
|
|
}
|
|
|
|
|
}
|