| | |
| | | * @param ids 用户ID列表 |
| | | * @return 用户列表 |
| | | */ |
| | | @PostMapping("/inner/xpOperationsUser/listByIds") |
| | | @PostMapping("/logan/inner/xpOperationsUser/listByIds") |
| | | public R<List<XpOperationsUser>> listByIds(@RequestBody List<Long> ids) { |
| | | return R.ok(xpOperationsUserService.listByIds(ids)); |
| | | } |
| | |
| | | * |
| | | * @return 用户列表 |
| | | */ |
| | | @GetMapping("/inner/xpOperationsUser/queryById") |
| | | @GetMapping("/logan/inner/xpOperationsUser/queryById") |
| | | R<XpOperationsUser> queryById(@RequestParam Long id) { |
| | | return R.ok(xpOperationsUserService.getById(id)); |
| | | } |
| | |
| | | * @param nickName 昵称 |
| | | * @return 运维用户列表 |
| | | */ |
| | | @PostMapping("/inner/xpOperationsUser/listByName") |
| | | @PostMapping("/logan/inner/xpOperationsUser/listByName") |
| | | public R<List<XpOperationsUser>> listByName(@RequestParam("nickName") String nickName) { |
| | | return R.ok(xpOperationsUserService.listByName(nickName)); |
| | | } |
| | |
| | | * @return 用户及角色信息列表 |
| | | */ |
| | | @ApiOperation(value = "批量查询用户及角色信息", tags = {"内部接口"}) |
| | | @PostMapping("/inner/xpOperationsUser/listByIdsWithRole") |
| | | @PostMapping("/logan/inner/xpOperationsUser/listByIdsWithRole") |
| | | public R<List<XpOperationsUserWithRoleVO>> listByIdsWithRole(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return R.ok(new ArrayList<>()); |
| | |
| | | * @return 用户及角色信息列表 |
| | | */ |
| | | @ApiOperation(value = "根据条件查询用户及角色信息", tags = {"内部接口"}) |
| | | @PostMapping("/inner/xpOperationsUser/queryByConditions") |
| | | @PostMapping("/logan/inner/xpOperationsUser/queryByConditions") |
| | | public R<List<XpOperationsUserWithRoleVO>> queryByConditions(@RequestBody XpOperationsUserQueryDTO dto) { |
| | | List<XpOperationsUserWithRoleVO> result = xpOperationsRoleMapper.selectUsersByConditions( |
| | | dto.getNickName(), |
| | |
| | | * @return 启用状态的用户列表 |
| | | */ |
| | | @ApiOperation(value = "获取所有启用状态的运维用户", tags = {"内部接口"}) |
| | | @GetMapping("/inner/xpOperationsUser/listAllEnabled") |
| | | @GetMapping("/logan/inner/xpOperationsUser/listAllEnabled") |
| | | public R<List<XpOperationsUser>> listAllEnabled() { |
| | | List<XpOperationsUser> users = xpOperationsUserService.lambdaQuery() |
| | | .eq(XpOperationsUser::getStatus, true) |
| | |
| | | * @return 用户信息列表 |
| | | */ |
| | | @ApiOperation(value = "根据手机号模糊查询用户及角色信息", tags = {"内部接口"}) |
| | | @PostMapping("/inner/xpOperationsUser/getByPhoneNumber") |
| | | @PostMapping("/logan/inner/xpOperationsUser/getByPhoneNumber") |
| | | public R<List<XpOperationsUser>> getByPhoneNumber(@RequestParam String phoneNumber) { |
| | | List<XpOperationsUser> result = xpOperationsUserService.getByPhoneNumber(phoneNumber); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | /** |
| | | * 根据手机号精确查询运维用户(内部接口) |
| | | * |
| | | * @param phoneNumber 手机号 |
| | | * @return 运维用户信息,不存在返回null |
| | | */ |
| | | @ApiOperation(value = "根据手机号精确查询运维用户", tags = {"内部接口"}) |
| | | @GetMapping("/logan/inner/xpOperationsUser/getByExactPhone") |
| | | public R<XpOperationsUser> getByExactPhone(@RequestParam("phoneNumber") String phoneNumber) { |
| | | XpOperationsUser user = xpOperationsUserService.lambdaQuery() |
| | | .eq(XpOperationsUser::getPhoneNumber, phoneNumber) |
| | | .last("LIMIT 1") |
| | | .one(); |
| | | return R.ok(user); |
| | | } |
| | | } |