| | |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.userInfo.PermissionBasicService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/permission") |
| | |
| | | this.permissionBasicService = permissionBasicService; |
| | | } |
| | | |
| | | @PostMapping("getPermission/{userId}") |
| | | public Result getPermission(@PathVariable Integer userId){ |
| | | return Result.seccess(permissionBasicService.getPermission(userId)); |
| | | @PostMapping("getPermission/{roleId}/{lang}") |
| | | public Result getPermission(@PathVariable Integer roleId,@PathVariable String lang, @RequestBody List<Integer> selectPageId){ |
| | | return Result.seccess(permissionBasicService.getPermission(roleId,lang,selectPageId)); |
| | | } |
| | | |
| | | @PostMapping("getPermissionList") |
| | | public Result getPermission(){ |
| | | return Result.seccess(permissionBasicService.getPermissionList()); |
| | | @PostMapping("getPermissionList/{lang}") |
| | | public Result getPermission(@PathVariable String lang){ |
| | | return Result.seccess(permissionBasicService.getPermissionList(lang)); |
| | | } |
| | | } |