|  |  |  | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.constants.OperaType; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.CreateRoleMenuDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.CreateRolePermissionDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.QuerySystemRoleDTO; | 
|---|
|  |  |  | 
|---|
|  |  |  | @GetMapping("/all") | 
|---|
|  |  |  | @RequiresPermissions("system:role:query") | 
|---|
|  |  |  | public ApiResponse<List<SystemRole>> findAll () { | 
|---|
|  |  |  | LoginUserInfo userInfo = this.getLoginUser(); | 
|---|
|  |  |  | SystemRole systemRole = new SystemRole(); | 
|---|
|  |  |  | systemRole.setDeleted(Boolean.FALSE); | 
|---|
|  |  |  | if(userInfo.getType().equals(Constants.ONE)){ | 
|---|
|  |  |  | systemRole.setType(userInfo.getType()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ApiResponse.success(systemRoleService.findList(systemRole)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|