|
|
|
@ -20,6 +20,7 @@ import com.ruoyi.common.satoken.utils.LoginHelper;
|
|
|
|
|
import com.ruoyi.system.api.domain.SysDept;
|
|
|
|
|
import com.ruoyi.system.api.domain.SysRole;
|
|
|
|
|
import com.ruoyi.system.api.domain.SysUser;
|
|
|
|
|
import com.ruoyi.system.api.model.LoginUser;
|
|
|
|
|
import com.ruoyi.system.domain.vo.SysUserExportVo;
|
|
|
|
|
import com.ruoyi.system.domain.vo.SysUserImportVo;
|
|
|
|
|
import com.ruoyi.system.listener.SysUserImportListener;
|
|
|
|
@ -110,15 +111,12 @@ public class SysUserController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("getInfo")
|
|
|
|
|
public R<Map<String, Object>> getInfo() {
|
|
|
|
|
SysUser user = userService.selectUserById(LoginHelper.getUserId());
|
|
|
|
|
// 角色集合
|
|
|
|
|
Set<String> roles = permissionService.getRolePermission(user);
|
|
|
|
|
// 权限集合
|
|
|
|
|
Set<String> permissions = permissionService.getMenuPermission(user);
|
|
|
|
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
|
|
|
|
SysUser user = userService.selectUserById(loginUser.getUserId());
|
|
|
|
|
Map<String, Object> ajax = new HashMap<>();
|
|
|
|
|
ajax.put("user", user);
|
|
|
|
|
ajax.put("roles", roles);
|
|
|
|
|
ajax.put("permissions", permissions);
|
|
|
|
|
ajax.put("roles", loginUser.getRolePermission());
|
|
|
|
|
ajax.put("permissions", loginUser.getMenuPermission());
|
|
|
|
|
return R.ok(ajax);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|