...
|
...
|
@@ -501,6 +501,9 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
}
|
|
|
|
|
|
}
|
|
|
if(empty($res)){
|
|
|
$res = null;
|
|
|
}
|
|
|
$this -> assign('res',$res);
|
|
|
|
|
|
return $this -> fetch();
|
...
|
...
|
@@ -571,7 +574,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
//查询业务员下级所有老师的订单
|
|
|
$teacher_user = Db::name('my_user') -> where("pid",$my_user['id']) -> select() -> toArray();
|
|
|
foreach ($teacher_user as $key => $val){
|
|
|
$teacher_indent[$key] = Db::name('indent') -> where("indent_type=1 and uid=".$val['uid']) -> select() -> toArray();
|
|
|
$teacher_indent[$key] = Db::name('indent') -> where("indent_type=1 and uid=".$val['uid']) -> where("state = 2 or state = 3 or state = 5") -> select() -> toArray();
|
|
|
foreach ($teacher_indent[$key] as $key1 => $val1){
|
|
|
$money_income = Db::name('money_income') -> where("indent_id=".$val1['id']." and uid=".$my_user['uid']) -> select();
|
|
|
foreach ($money_income as $key3 => $val3){
|
...
|
...
|
@@ -585,7 +588,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
$student[$key] = Db::name('my_user') -> where("pid",$val['id']) -> select();
|
|
|
//查询学生的所有订单
|
|
|
foreach ($student[$key] as $key1 => $val1){
|
|
|
$student_indent[$key1] = Db::name('indent') -> where("indent_type=1 and uid=".$val1['uid']) -> select();
|
|
|
$student_indent[$key1] = Db::name('indent') -> where("indent_type=1 and uid=".$val1['uid']) -> where("state = 2 or state = 3 or state = 5") -> select();
|
|
|
//查询学生订单下属于业务员的收入记录
|
|
|
foreach ($student_indent[$key1] as $key2 => $val2){
|
|
|
$student_money_income = Db::name('money_income') -> where("indent_id=".$val2['id']." and uid=".$my_user['uid']) -> select();
|
...
|
...
|
@@ -595,6 +598,9 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if(empty($platform_money)){
|
|
|
$platform_money = null;
|
|
|
}
|
|
|
$this -> assign('platform_money',$platform_money);
|
|
|
}else{
|
|
|
$this -> error('非业务员不能进去此页');
|
...
|
...
|
@@ -624,8 +630,6 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|