| | |
| | | { |
| | | |
| | | //执行sql |
| | | strProcName = "select * from [dbo].[TUser] where username=@username and password=@password"; |
| | | strProcName = "select * from [dbo].[TUser] where usercode=@username and password=@password"; |
| | | //创建参数 |
| | | listStr.Add(new SqlParameter("@username", username)); |
| | | listStr.Add(new SqlParameter("@password", password)); |
| | |
| | | try |
| | | { |
| | | //获取菜单集合(根据登录用户编码查询权限反推菜单) |
| | | sql = @"select distinct rt.right_code as code,rt.right_name as name,rt.right_seq from TRight rt where rt.right_code in( |
| | | sql = @"select distinct rt.right_code as code,rt.right_name as name,rt.right_seq,rt.is_delete as flag from TRight rt where rt.right_code in( |
| | | select A.parent_id from TRight A |
| | | left join TRoleRightRelation B on B.right_code=A.right_code |
| | | left join TRole C on C.role_code=B.role_code |
| | |
| | | var data = DapperHelper.select<TreeObejct>(sql, dynamicParams); |
| | | for (int i = 0; i < data.Count; i++) |
| | | { |
| | | sql = @"select distinct mu.right_code as code,mu.right_name as name,mu.right_seq |
| | | sql = @"select distinct mu.right_code as code,mu.right_name as name,mu.right_seq,mu.is_delete as flag |
| | | from TRight mu |
| | | inner join TRoleRightRelation rl on mu.right_code=rl.right_code |
| | | inner join TUserRoleRelation ro on rl.role_code=ro.role_code |