| | |
| | | } |
| | | |
| | | @ApiOperation("获取用户详细") |
| | | @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class) |
| | | @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Long.class) |
| | | @GetMapping("/{userId}") |
| | | public R<UserEntity> getUser(@PathVariable Integer userId) |
| | | public R<UserEntity> getUser(@PathVariable Long userId) |
| | | { |
| | | if (!users.isEmpty() && users.containsKey(userId)) |
| | | { |
| | |
| | | |
| | | @ApiOperation("新增用户") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "userId", value = "用户id", dataType = "long", dataTypeClass = Long.class), |
| | | @ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class) |
| | |
| | | } |
| | | |
| | | @ApiOperation("删除用户信息") |
| | | @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class) |
| | | @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "long", paramType = "path", dataTypeClass = Long.class) |
| | | @DeleteMapping("/{userId}") |
| | | public R<String> delete(@PathVariable Integer userId) |
| | | public R<String> delete(@PathVariable Long userId) |
| | | { |
| | | if (!users.isEmpty() && users.containsKey(userId)) |
| | | { |