...
|
...
|
@@ -80,7 +80,6 @@ class OrderpageController extends WeChatBaseController{ |
|
|
//判断这个用户所属哪个业务员
|
|
|
$uid = cmf_get_current_user_id();
|
|
|
$user = Db::name('my_user') -> where('uid',$uid) -> find();
|
|
|
$salesman = '';
|
|
|
//当当前用户为老师时
|
|
|
if($user['status'] == 3){
|
|
|
$salesman = Db::name('my_user') -> where('id',$user['pid']) -> find();
|
...
|
...
|
@@ -91,7 +90,7 @@ class OrderpageController extends WeChatBaseController{ |
|
|
$salesman = Db::name('my_user') -> where('id',$teacher['pid']) -> find();
|
|
|
}
|
|
|
//查询这个用户下添加的学校
|
|
|
$school = Db::name('school') -> where("uid",$salesman['uid']) -> select() -> toArray();
|
|
|
$school = Db::name('school') -> where("uid",!empty($salesman['uid']) ? $salesman['uid'] : 0) -> select() -> toArray();
|
|
|
|
|
|
if(!empty($school)){
|
|
|
$grade_class = Db::name('grade_class') -> where("school_id",$school[0]['id']) -> select();
|
...
|
...
|
|