|
@@ -1,5 +1,6 @@
|
|
|
package com.ym.mec.auth.web.controller;
|
|
|
|
|
|
+import com.ym.mec.common.page.QueryInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -316,6 +317,12 @@ public class UserController extends BaseController {
|
|
|
public Object getRole() {
|
|
|
AuthUser user = SecurityUtils.getUser();
|
|
|
if (user != null) {
|
|
|
+ SysUser sysUser = sysUserService.get(user.getUserId());
|
|
|
+ if(sysUser.getIsSuperAdmin()){
|
|
|
+ QueryInfo queryInfo = new QueryInfo();
|
|
|
+ queryInfo.setRows(9999);
|
|
|
+ return succeed(sysRoleService.queryPage(queryInfo).getRows());
|
|
|
+ }
|
|
|
return succeed(sysRoleService.findRoleByUserId(user.getUserId()));
|
|
|
}
|
|
|
return failed();
|