| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 密码策略(PlSysStrategy)表控制层 |
| | | * 密码策略(Strategy)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2023-03-20 16:45:31 |
| | |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "分页查询", notes = "传入combination,分页参数query") |
| | | @ApiOperation(value = "分页查询", notes = "传入分页参数query") |
| | | public R<Page<Strategy>> queryByPage(Query query) { |
| | | Page<Strategy> strategyPage = strategyService.queryAllByPage(query); |
| | | return R.data(strategyPage); |
| | | } |
| | | |
| | | /** |
| | | * 查询默认密码策略 |
| | | * |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/default") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "查询默认密码策略") |
| | | public R<Strategy> queryByIsDefault() { |
| | | Strategy strategy = strategyService.queryByIsDefault(); |
| | | return R.data(strategy); |
| | | } |
| | | |
| | | /** |
| | |
| | | return ResponseEntity.ok(this.strategyService.deleteByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户id查询密码策略 |
| | | * |
| | | * @param userId 实体 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/query-userid") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "根据用户id查询密码策略", notes = "传入userId") |
| | | public R<Strategy> queryByUserId(@Valid @RequestParam Long userId) { |
| | | return R.data(this.strategyService.queryByUserId(userId)); |
| | | } |
| | | |
| | | } |
| | | |