| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 2/13/2024 |
| | |
| | | @Autowired |
| | | private RoleService roleService; |
| | | |
| | | // @PreAuthorize("hasAuthority('sys:role:list')") |
| | | // @PostMapping("/role/page") |
| | | // public R page(@RequestBody BaseParam param) { |
| | | // PageParam<Role, BaseParam> page = new PageParam<>(param); |
| | | // return R.ok().add(roleService.page(page, page.getWrapper())); |
| | | // } |
| | | |
| | | @PreAuthorize("hasAuthority('sys:role:list')") |
| | | @PostMapping("/role/page") |
| | | public R page(@RequestBody BaseParam param) { |
| | | PageParam<Role, BaseParam> page = new PageParam<>(param); |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = getBaseParam(map); |
| | | PageParam<Role, BaseParam> page = new PageParam<>(baseParam); |
| | | return R.ok().add(roleService.page(page, page.getWrapper())); |
| | | } |
| | | |