|
|
|
@ -1706,12 +1706,25 @@ function get_admin_listOther()
|
|
|
|
|
* @param $promote_id
|
|
|
|
|
* @return mixed
|
|
|
|
|
*/
|
|
|
|
|
function getOffspringByPromoteId($promote_id) {
|
|
|
|
|
$promote_ids = M('promote', 'tab_')
|
|
|
|
|
->where(['chain' => ['like', "%/{$promote_id}/%"]])
|
|
|
|
|
->field('group_concat(id) as promote_ids')
|
|
|
|
|
->find();
|
|
|
|
|
return $promote_ids['promote_ids'];
|
|
|
|
|
function getOffspringByPromoteId($promote_id = null) {
|
|
|
|
|
if (isset($promote_id)) {
|
|
|
|
|
if ($promote_id ==0) {//官方渠道
|
|
|
|
|
$promote_ids = '0';
|
|
|
|
|
} else {
|
|
|
|
|
$where['chain'] = ['like', "%/{$promote_id}/%"];
|
|
|
|
|
$where['id'] = $promote_id;//会长本身
|
|
|
|
|
$where['_logic'] = 'or';
|
|
|
|
|
$map['_complex'] = $where;
|
|
|
|
|
$promote_ids = M('promote', 'tab_')
|
|
|
|
|
->where($map)
|
|
|
|
|
->field('group_concat(id) as promote_ids')
|
|
|
|
|
->find();
|
|
|
|
|
$promote_ids = $promote_ids['promote_ids'];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$promote_ids = getPowerPromoteIds();
|
|
|
|
|
}
|
|
|
|
|
return $promote_ids;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|