,A.AnnualLeaveDay, A.DirectSupervisor,A.OpenId,A.ActivationStatus,IFNULL(B.MName,'') AS AccountName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id,IFNULL(B.Email,'') AS Email,B.IsTenCccUser
,B.UserRole
,B.UserRole,1 as IsShow
FROM rb_account AS A INNER JOIN rb_manager AS B ON A.AccountId=B.MId AND A.AccountType=1
,A.AnnualLeaveDay, A.DirectSupervisor,A.OpenId,A.ActivationStatus,IFNULL(B.TeacherName,'') AS AccountName,B.TeacherIcon AS UserIcon,B.Dept_Id,B.Post_Id,IFNULL(B.Email,'') AS Email,B.IsTenCccUser
,B.UserRole
,B.UserRole,B.IsShow
FROM rb_account AS A INNER JOIN rb_teacher AS B ON A.AccountId=B.TId AND A.AccountType=2
,A.AnnualLeaveDay, A.DirectSupervisor,A.OpenId,A.ActivationStatus,IFNULL(B.AssistName,'') AS AccountName,B.AssistIcon AS UserIcon,B.Dept_Id,B.Post_Id,IFNULL(B.Email,'') AS Email,0 AS IsTenCccUser
,0 AS UserRole
,0 AS UserRole,1 as IsShow
FROM rb_account AS A INNER JOIN rb_assist AS B ON A.AccountId=B.AId AND A.AccountType=3
WHERE 1=1 {0}
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId